# coding=utf-8
# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.

#import serial
import platform
import time
import math
import random
import os
import calendar
###########################
#
#tree_four_meter
#A about
#all_watch_power_electricityA
#all_watch_power_electricity_feilv1A
#all_watch_power_electricity_feilv2A
#all_watch_power_electricity_feilv3A
#all_watch_power_electricity_feilv4A
#all_watch_power_electricityA1
#all_watch_power_electricity_feilv1A1
#all_watch_power_electricity_feilv2A1
#all_watch_power_electricity_feilv3A1
#all_watch_power_electricity_feilv4A1
#all_active_power_electricityA
#all_active_power_electricityA1
#all_reactive_power_electricityA
#all_reactive_power_electricityA1
#all_active_power_electricity_feilv1A
#all_active_power_electricity_feilv2A
#all_active_power_electricity_feilv3A
#all_active_power_electricity_feilv4A
#all_active_power_electricity_feilv1A1
#all_active_power_electricity_feilv2A1
#all_active_power_electricity_feilv3A1
#all_active_power_electricity_feilv4A1
#all_quadrant1_reactive_power_electricityA
#all_quadrant1_reactive_power_electricity_feilv1A
#all_quadrant1_reactive_power_electricity_feilv2A
#all_quadrant1_reactive_power_electricity_feilv3A
#all_quadrant1_reactive_power_electricity_feilv4A
#all_quadrant2_reactive_power_electricityA
#all_quadrant2_reactive_power_electricity_feilv1A
#all_quadrant2_reactive_power_electricity_feilv2A
#all_quadrant2_reactive_power_electricity_feilv3A
#all_quadrant2_reactive_power_electricity_feilv4A
#all_quadrant3_reactive_power_electricityA
#all_quadrant3_reactive_power_electricity_feilv1A
#all_quadrant3_reactive_power_electricity_feilv2A
#all_quadrant3_reactive_power_electricity_feilv3A
#all_quadrant3_reactive_power_electricity_feilv4A
#all_quadrant4_reactive_power_electricityA
#all_quadrant4_reactive_power_electricity_feilv1A
#all_quadrant4_reactive_power_electricity_feilv2A
#all_quadrant4_reactive_power_electricity_feilv3A
#all_quadrant4_reactive_power_electricity_feilv4A
#
#max_power_need
#max_power_need_time
#
#
###########################
class tree_four_meter():
    #
    def __init__(self, address,max_current,dict_tmp):
        # 地址
        if (type(address) == type("")):
            self.address = address  # 最大电流
        else:
            self.address = str(address)  # 最大电流

        # 最大电流
        if(type(max_current)==type("")):
            self.max_current=max_current#最大电流
        else:
            self.max_current = str(max_current)  # 最大电流

        # 运行时间 str
        self.star_time = time.strftime("%Y-%m-%d-%H-%M", time.localtime())
        # 当前时间 time struct
        self.new_time = time.localtime(time.time())
        # 输入的参数 dict类型 费率和冻结配置
        self.dict_tmp = {}
        if (type(dict_tmp) == type(self.dict_tmp)):
            self.dict_tmp = dict_tmp
        ###################################原参数获得############################################################
        self.dir_pwd = None  # 路径
        self.read_all_data = {}  # 读到的配置文件
        self.write_all_data = {}  # 准备写的配置文件
        self.cold_data_read()  # 读取保存的数据 建立两个文件夹 一个地址文件和log文件

        #DTL64 组合配置参数
        self.active_struct = 0x09
        self.reactive_struct1 = 0xAA
        self.reactive_struct2 = 0xAA
        #电量单次计算时间
        self.electricity_time=0 #秒 s
        # 电压
        self.voltageA = 0.0
        self.voltageB = 0.0
        self.voltageC = 0.0
        # 电流
        self.currentA = 0.0
        self.currentB = 0.0
        self.currentC = 0.0
        # 有功的方向 0是正向 1是反向 也是电流的正反方向
        self.activeA_way = 0.0
        self.activeB_way = 0.0
        self.activeC_way = 0.0
        # 无功的方向 0是正向 1是反向
        self.reactiveA_way = 0.0
        self.reactiveB_way = 0.0
        self.reactiveC_way = 0.0
        # 功率因子
        self.power_factorA=0.0
        self.power_factorB = 0.0
        self.power_factorC = 0.0
        self.power_factorALL = 0.0

        #频率
        self.frequency=0.0
        ##################################有功功率相关参数############################################
        ##################################A#########################################################
        #视在正向电量
        try:
            self.all_watch_power_electricityA = float(self.read_all_data["all_watch_power_electricityA"])
        except:
            self.all_watch_power_electricityA = 0.0
        #费率1
        try:
            self.all_watch_power_electricity_feilv1A = float(self.read_all_data["all_watch_power_electricity_feilv1A"])
        except:
            self.all_watch_power_electricity_feilv1A = 0.0
        # 费率2
        try:
            self.all_watch_power_electricity_feilv2A = float(self.read_all_data["all_watch_power_electricity_feilv2A"])
        except:
            self.all_watch_power_electricity_feilv2A = 0.0
        # 费率3
        try:
            self.all_watch_power_electricity_feilv3A = float(self.read_all_data["all_watch_power_electricity_feilv3A"])
        except:
            self.all_watch_power_electricity_feilv3A = 0.0
        # 费率4
        try:
            self.all_watch_power_electricity_feilv4A = float(self.read_all_data["all_watch_power_electricity_feilv4A"])
        except:
            self.all_watch_power_electricity_feilv4A = 0.0
        # 视在反向电量
        try:
            self.all_watch_power_electricityA1 = float(self.read_all_data["all_watch_power_electricityA1"])
        except:
            self.all_watch_power_electricityA1 = 0.0
        # 费率1
        try:
            self.all_watch_power_electricity_feilv1A1 = float(
                self.read_all_data["all_watch_power_electricity_feilv1A1"])
        except:
            self.all_watch_power_electricity_feilv1A1 = 0.0
        # 费率2
        try:
            self.all_watch_power_electricity_feilv2A1 = float(
                self.read_all_data["all_watch_power_electricity_feilv2A1"])
        except:
            self.all_watch_power_electricity_feilv2A1 = 0.0
        # 费率3
        try:
            self.all_watch_power_electricity_feilv3A1 = float(
                self.read_all_data["all_watch_power_electricity_feilv3A1"])
        except:
            self.all_watch_power_electricity_feilv3A1 = 0.0
        # 费率4
        try:
            self.all_watch_power_electricity_feilv4A1 = float(
                self.read_all_data["all_watch_power_electricity_feilv4A1"])
        except:
            self.all_watch_power_electricity_feilv4A1 = 0.0

        # 有功正向电量
        try:
            self.all_active_power_electricityA = float(self.read_all_data["all_active_power_electricityA"])#全部的有功功率
        except:
            self.all_active_power_electricityA = 0.0  # 全部的有功功率
        # 有功反向电量
        try:
            self.all_active_power_electricityA1 = float(
                self.read_all_data["all_active_power_electricityA1"])
        except:
            self.all_active_power_electricityA1 = 0.0  # 全部的有功功率

        #无功正向电量
        #try:
        #    self.all_reactive_power_electricityA=float(self.read_all_data["all_reactive_power_electricityA"]) #全部的无功功率
        #except:
        #    self.all_reactive_power_electricityA = 0.0  # 全部的无功功率
        # 无功反向电量
        #try:
        #    self.all_reactive_power_electricityA1=float(self.read_all_data["all_reactive_power_electricityA1"]) #全部的无功功率
        #except:
        #    self.all_reactive_power_electricityA1 = 0.0  # 全部的无功功率
        ###################################费率相关参数########################################################################
        try:
            # 正向有功费率
            self.all_active_power_electricity_feilv1A = float(self.read_all_data["all_active_power_electricity_feilv1A"])
            self.all_active_power_electricity_feilv2A = float(self.read_all_data["all_active_power_electricity_feilv2A"])
            self.all_active_power_electricity_feilv3A = float(self.read_all_data["all_active_power_electricity_feilv3A"])
            self.all_active_power_electricity_feilv4A = float(self.read_all_data["all_active_power_electricity_feilv4A"])
            # 反向有功费率
            self.all_active_power_electricity_feilv1A1 = float(
                self.read_all_data["all_active_power_electricity_feilv1A1"])
            self.all_active_power_electricity_feilv2A1 = float(
                self.read_all_data["all_active_power_electricity_feilv2A1"])
            self.all_active_power_electricity_feilv3A1 = float(
                self.read_all_data["all_active_power_electricity_feilv3A1"])
            self.all_active_power_electricity_feilv4A1 = float(
                self.read_all_data["all_active_power_electricity_feilv4A1"])

        except:
            # 正向有功费率
            self.all_active_power_electricity_feilv1A = 0.0
            self.all_active_power_electricity_feilv2A = 0.0
            self.all_active_power_electricity_feilv3A = 0.0
            self.all_active_power_electricity_feilv4A = 0.0
            # 反向有功费率
            self.all_active_power_electricity_feilv1A1 = 0.0
            self.all_active_power_electricity_feilv2A1 = 0.0
            self.all_active_power_electricity_feilv3A1 = 0.0
            self.all_active_power_electricity_feilv4A1 = 0.0

        ########象限###############################################################################################
        try:
            # 第一象限总无功电能
            self.all_quadrant1_reactive_power_electricityA = float(
                self.read_all_data["all_quadrant1_reactive_power_electricityA"])
            self.all_quadrant1_reactive_power_electricity_feilv1A = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv1A"])
            self.all_quadrant1_reactive_power_electricity_feilv2A = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv2A"])
            self.all_quadrant1_reactive_power_electricity_feilv3A = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv3A"])
            self.all_quadrant1_reactive_power_electricity_feilv4A = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv4A"])
            # 第二象限总无功电能
            self.all_quadrant2_reactive_power_electricityA = float(
                self.read_all_data["all_quadrant2_reactive_power_electricityA"])
            self.all_quadrant2_reactive_power_electricity_feilv1A = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv1A"])
            self.all_quadrant2_reactive_power_electricity_feilv2A = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv2A"])
            self.all_quadrant2_reactive_power_electricity_feilv3A = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv3A"])
            self.all_quadrant2_reactive_power_electricity_feilv4A = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv4A"])
            #第三象限总无功电能
            self.all_quadrant3_reactive_power_electricityA = float(
                self.read_all_data["all_quadrant3_reactive_power_electricityA"])
            self.all_quadrant3_reactive_power_electricity_feilv1A = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv1A"])
            self.all_quadrant3_reactive_power_electricity_feilv2A = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv2A"])
            self.all_quadrant3_reactive_power_electricity_feilv3A = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv3A"])
            self.all_quadrant3_reactive_power_electricity_feilv4A = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv4A"])

            # 第四象限总无功电能
            self.all_quadrant4_reactive_power_electricityA = float(
                self.read_all_data["all_quadrant4_reactive_power_electricityA"])
            self.all_quadrant4_reactive_power_electricity_feilv1A = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv1A"])
            self.all_quadrant4_reactive_power_electricity_feilv2A = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv2A"])
            self.all_quadrant4_reactive_power_electricity_feilv3A = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv3A"])
            self.all_quadrant4_reactive_power_electricity_feilv4A = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv4A"])

        except:
            self.all_quadrant1_reactive_power_electricityA =0.0
            self.all_quadrant1_reactive_power_electricity_feilv1A = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv2A = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv3A = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv4A = 0.0

            self.all_quadrant2_reactive_power_electricityA = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv1A = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv2A = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv3A = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv4A = 0.0

            self.all_quadrant3_reactive_power_electricityA = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv1A = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv2A = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv3A = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv4A = 0.0

            self.all_quadrant4_reactive_power_electricityA = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv1A = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv2A = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv3A = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv4A = 0.0

        ##################################B#########################################################
        # 视在正向电量
        try:
            self.all_watch_power_electricityB = float(self.read_all_data["all_watch_power_electricityB"])
        except:
            self.all_watch_power_electricityB = 0.0
        # 费率1
        try:
            self.all_watch_power_electricity_feilv1B = float(
                self.read_all_data["all_watch_power_electricity_feilv1B"])
        except:
            self.all_watch_power_electricity_feilv1B = 0.0
        # 费率2
        try:
            self.all_watch_power_electricity_feilv2B = float(
                self.read_all_data["all_watch_power_electricity_feilv2B"])
        except:
            self.all_watch_power_electricity_feilv2B = 0.0
        # 费率3
        try:
            self.all_watch_power_electricity_feilv3B = float(
                self.read_all_data["all_watch_power_electricity_feilv3B"])
        except:
            self.all_watch_power_electricity_feilv3B = 0.0
        # 费率4
        try:
            self.all_watch_power_electricity_feilv4B = float(
                self.read_all_data["all_watch_power_electricity_feilv4B"])
        except:
            self.all_watch_power_electricity_feilv4B = 0.0
        # 视在反向电量
        try:
            self.all_watch_power_electricityB1 = float(
                self.read_all_data["all_watch_power_electricityB1"])
        except:
            self.all_watch_power_electricityB1 = 0.0
        # 费率1
        try:
            self.all_watch_power_electricity_feilv1B1 = float(
                self.read_all_data["all_watch_power_electricity_feilv1B1"])
        except:
            self.all_watch_power_electricity_feilv1B1 = 0.0
        # 费率2
        try:
            self.all_watch_power_electricity_feilv2B1 = float(
                self.read_all_data["all_watch_power_electricity_feilv2B1"])
        except:
            self.all_watch_power_electricity_feilv2B1 = 0.0
        # 费率3
        try:
            self.all_watch_power_electricity_feilv3B1 = float(
                self.read_all_data["all_watch_power_electricity_feilv3B1"])
        except:
            self.all_watch_power_electricity_feilv3B1 = 0.0
        # 费率4
        try:
            self.all_watch_power_electricity_feilv4B1 = float(
                self.read_all_data["all_watch_power_electricity_feilv4B1"])
        except:
            self.all_watch_power_electricity_feilv4B1 = 0.0
        # 有功正向电量
        try:
            self.all_active_power_electricityB = float(
                self.read_all_data["all_active_power_electricityB"])  # 全部的有功功率
        except:
            self.all_active_power_electricityB = 0.0  # 全部的有功功率
        # 有功反向电量
        try:
            self.all_active_power_electricityB1 = float(
                self.read_all_data["all_active_power_electricityB1"])  # 全部的有功功率
        except:
            self.all_active_power_electricityB1 = 0.0  # 全部的有功功率

        # 无功正向电量
        #try:
        #    self.all_reactive_power_electricityB = float(
        #        self.read_all_data["all_reactive_power_electricityB"])  # 全部的无功功率
        #except:
        #    self.all_reactive_power_electricityB = 0.0  # 全部的无功功率
        # 无功反向电量
        #try:
        #    self.all_reactive_power_electricityB1 = float(
        #        self.read_all_data["all_reactive_power_electricityB1"])  # 全部的无功功率
        #except:
        #    self.all_reactive_power_electricityB1 = 0.0  # 全部的无功功率
        ###################################费率相关参数########################################################################
        try:
            # 正向有功费率
            self.all_active_power_electricity_feilv1B = float(self.read_all_data["all_active_power_electricity_feilv1B"])
            self.all_active_power_electricity_feilv2B = float(self.read_all_data["all_active_power_electricity_feilv2B"])
            self.all_active_power_electricity_feilv3B = float(self.read_all_data["all_active_power_electricity_feilv3B"])
            self.all_active_power_electricity_feilv4B = float(self.read_all_data["all_active_power_electricity_feilv4B"])
            # 反向有功费率
            self.all_active_power_electricity_feilv1B1 = float(
                self.read_all_data["all_active_power_electricity_feilv1B1"])
            self.all_active_power_electricity_feilv2B1 = float(
                self.read_all_data["all_active_power_electricity_feilv2B1"])
            self.all_active_power_electricity_feilv3B1 = float(
                self.read_all_data["all_active_power_electricity_feilv3B1"])
            self.all_active_power_electricity_feilv4B1 = float(
                self.read_all_data["all_active_power_electricity_feilv4B1"])

        except:
            # 正向有功费率
            self.all_active_power_electricity_feilv1B = 0.0
            self.all_active_power_electricity_feilv2B = 0.0
            self.all_active_power_electricity_feilv3B = 0.0
            self.all_active_power_electricity_feilv4B = 0.0
            # 反向有功费率
            self.all_active_power_electricity_feilv1B1 = 0.0
            self.all_active_power_electricity_feilv2B1 = 0.0
            self.all_active_power_electricity_feilv3B1 = 0.0
            self.all_active_power_electricity_feilv4B1 = 0.0

        ########象限###############################################################################################
        try:
            # 第一象限总无功电能
            self.all_quadrant1_reactive_power_electricityB = float(
                self.read_all_data["all_quadrant1_reactive_power_electricityB"])
            self.all_quadrant1_reactive_power_electricity_feilv1B = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv1B"])
            self.all_quadrant1_reactive_power_electricity_feilv2B = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv2B"])
            self.all_quadrant1_reactive_power_electricity_feilv3B = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv3B"])
            self.all_quadrant1_reactive_power_electricity_feilv4B = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv4B"])

            # 第二象限总无功电能
            self.all_quadrant2_reactive_power_electricityB = float(
                self.read_all_data["all_quadrant2_reactive_power_electricityB"])
            self.all_quadrant2_reactive_power_electricity_feilv1B = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv1B"])
            self.all_quadrant2_reactive_power_electricity_feilv2B = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv2B"])
            self.all_quadrant2_reactive_power_electricity_feilv3B = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv3B"])
            self.all_quadrant2_reactive_power_electricity_feilv4B = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv4B"])

            # 第三象限总无功电能
            self.all_quadrant3_reactive_power_electricityB = float(
                self.read_all_data["all_quadrant3_reactive_power_electricityB"])
            self.all_quadrant3_reactive_power_electricity_feilv1B = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv1B"])
            self.all_quadrant3_reactive_power_electricity_feilv2B = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv2B"])
            self.all_quadrant3_reactive_power_electricity_feilv3B = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv3B"])
            self.all_quadrant3_reactive_power_electricity_feilv4B = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv4B"])

            # 第四象限总无功电能
            self.all_quadrant4_reactive_power_electricityB = float(
                self.read_all_data["all_quadrant4_reactive_power_electricityB"])
            self.all_quadrant4_reactive_power_electricity_feilv1B = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv1B"])
            self.all_quadrant4_reactive_power_electricity_feilv2B = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv2B"])
            self.all_quadrant4_reactive_power_electricity_feilv3B = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv3B"])
            self.all_quadrant4_reactive_power_electricity_feilv4B = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv4B"])

        except:
            self.all_quadrant1_reactive_power_electricityB = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv1B = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv2B = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv3B = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv4B = 0.0

            self.all_quadrant2_reactive_power_electricityB = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv1B = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv2B = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv3B = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv4B = 0.0

            self.all_quadrant3_reactive_power_electricityB = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv1B = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv2B = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv3B = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv4B = 0.0

            self.all_quadrant4_reactive_power_electricityB = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv1B = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv2B = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv3B = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv4B = 0.0

        ##################################C#########################################################
        # 视在正向电量
        try:
            self.all_watch_power_electricityC = float(
                self.read_all_data["all_watch_power_electricityC"])
        except:
            self.all_watch_power_electricityC = 0.0
        # 费率1
        try:
            self.all_watch_power_electricity_feilv1C = float(
                self.read_all_data["all_watch_power_electricity_feilv1C"])
        except:
            self.all_watch_power_electricity_feilv1C = 0.0
        # 费率2
        try:
            self.all_watch_power_electricity_feilv2C = float(
                self.read_all_data["all_watch_power_electricity_feilv2C"])
        except:
            self.all_watch_power_electricity_feilv2C = 0.0
        # 费率3
        try:
            self.all_watch_power_electricity_feilv3C = float(
                self.read_all_data["all_watch_power_electricity_feilv3C"])
        except:
            self.all_watch_power_electricity_feilv3C = 0.0
        # 费率4
        try:
            self.all_watch_power_electricity_feilv4C = float(
                self.read_all_data["all_watch_power_electricity_feilv4C"])
        except:
            self.all_watch_power_electricity_feilv4C = 0.0

        # 视在反向电量
        try:
            self.all_watch_power_electricityC1 = float(
                self.read_all_data["all_watch_power_electricityC1"])
        except:
            self.all_watch_power_electricityC1 = 0.0
        # 费率1
        try:
            self.all_watch_power_electricity_feilv1C1 = float(
                self.read_all_data["all_watch_power_electricity_feilv1C1"])
        except:
            self.all_watch_power_electricity_feilv1C1= 0.0
        # 费率2
        try:
            self.all_watch_power_electricity_feilv2C1 = float(
                self.read_all_data["all_watch_power_electricity_feilv2C1"])
        except:
            self.all_watch_power_electricity_feilv2C1 = 0.0
        # 费率3
        try:
            self.all_watch_power_electricity_feilv3C1 = float(
                self.read_all_data["all_watch_power_electricity_feilv3C1"])
        except:
            self.all_watch_power_electricity_feilv3C1 = 0.0
        # 费率4
        try:
            self.all_watch_power_electricity_feilv4C1 = float(
                self.read_all_data["all_watch_power_electricity_feilv4C1"])
        except:
            self.all_watch_power_electricity_feilv4C1 = 0.0

        # 有功正向电量
        try:
            self.all_active_power_electricityC = float(
                self.read_all_data["all_active_power_electricityC"])  # 全部的有功功率
        except:
            self.all_active_power_electricityC = 0.0  # 全部的有功功率
        # 有功反向电量
        try:
            self.all_active_power_electricityC1 = float(
                self.read_all_data["all_active_power_electricityC1"])  # 全部的有功功率
        except:
            self.all_active_power_electricityC1 = 0.0  # 全部的有功功率

        # 无功正向电量
        #try:
        #    self.all_reactive_power_electricityC = float(
        #        self.read_all_data["all_reactive_power_electricityC"])  # 全部的无功功率
        #except:
        #    self.all_reactive_power_electricityC = 0.0  # 全部的无功功率
        # 无功反向电量
        #try:
        #    self.all_reactive_power_electricityC1 = float(
        #        self.read_all_data["all_reactive_power_electricityC1"])  # 全部的无功功率
        #except:
        #    self.all_reactive_power_electricityC1 = 0.0  # 全部的无功功率
        ###################################费率相关参数########################################################################
        try:
            # 正向有功费率
            self.all_active_power_electricity_feilv1C = float(self.read_all_data["all_active_power_electricity_feilv1C"])
            self.all_active_power_electricity_feilv2C = float(self.read_all_data["all_active_power_electricity_feilv2C"])
            self.all_active_power_electricity_feilv3C = float(self.read_all_data["all_active_power_electricity_feilv3C"])
            self.all_active_power_electricity_feilv4C = float(self.read_all_data["all_active_power_electricity_feilv4C"])
            # 反向有功费率
            self.all_active_power_electricity_feilv1C1 = float(
                self.read_all_data["all_active_power_electricity_feilv1C1"])
            self.all_active_power_electricity_feilv2C1 = float(
                self.read_all_data["all_active_power_electricity_feilv2C1"])
            self.all_active_power_electricity_feilv3C1 = float(
                self.read_all_data["all_active_power_electricity_feilv3C1"])
            self.all_active_power_electricity_feilv4C1 = float(
                self.read_all_data["all_active_power_electricity_feilv4C1"])

        except:
            # 正向有功费率
            self.all_active_power_electricity_feilv1C = 0.0
            self.all_active_power_electricity_feilv2C = 0.0
            self.all_active_power_electricity_feilv3C = 0.0
            self.all_active_power_electricity_feilv4C = 0.0
            # 反向有功费率
            self.all_active_power_electricity_feilv1C1 = 0.0
            self.all_active_power_electricity_feilv2C1 = 0.0
            self.all_active_power_electricity_feilv3C1 = 0.0
            self.all_active_power_electricity_feilv4C1 = 0.0

        ########象限###############################################################################################
        try:
            # 第一象限总无功电能
            self.all_quadrant1_reactive_power_electricityC = float(
                self.read_all_data["all_quadrant1_reactive_power_electricityC"])
            self.all_quadrant1_reactive_power_electricity_feilv1C = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv1C"])
            self.all_quadrant1_reactive_power_electricity_feilv2C = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv2C"])
            self.all_quadrant1_reactive_power_electricity_feilv3C = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv3C"])
            self.all_quadrant1_reactive_power_electricity_feilv4C = float(
                self.read_all_data["all_quadrant1_reactive_power_electricity_feilv4C"])

            # 第二象限总无功电能
            self.all_quadrant2_reactive_power_electricityC = float(
                self.read_all_data["all_quadrant2_reactive_power_electricityC"])
            self.all_quadrant2_reactive_power_electricity_feilv1C = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv1C"])
            self.all_quadrant2_reactive_power_electricity_feilv2C = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv2C"])
            self.all_quadrant2_reactive_power_electricity_feilv3C = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv3C"])
            self.all_quadrant2_reactive_power_electricity_feilv4C = float(
                self.read_all_data["all_quadrant2_reactive_power_electricity_feilv4C"])

            # 第三象限总无功电能
            self.all_quadrant3_reactive_power_electricityC = float(
                self.read_all_data["all_quadrant3_reactive_power_electricityC"])
            self.all_quadrant3_reactive_power_electricity_feilv1C = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv1C"])
            self.all_quadrant3_reactive_power_electricity_feilv2C = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv2C"])
            self.all_quadrant3_reactive_power_electricity_feilv3C = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv3C"])
            self.all_quadrant3_reactive_power_electricity_feilv4C = float(
                self.read_all_data["all_quadrant3_reactive_power_electricity_feilv4C"])

            # 第四象限总无功电能
            self.all_quadrant4_reactive_power_electricityC = float(
                self.read_all_data["all_quadrant4_reactive_power_electricityC"])
            self.all_quadrant4_reactive_power_electricity_feilv1C = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv1C"])
            self.all_quadrant4_reactive_power_electricity_feilv2C = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv2C"])
            self.all_quadrant4_reactive_power_electricity_feilv3C = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv3C"])
            self.all_quadrant4_reactive_power_electricity_feilv4C = float(
                self.read_all_data["all_quadrant4_reactive_power_electricity_feilv4C"])

        except:
            self.all_quadrant1_reactive_power_electricityC = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv1C = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv2C = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv3C = 0.0
            self.all_quadrant1_reactive_power_electricity_feilv4C = 0.0

            self.all_quadrant2_reactive_power_electricityC = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv1C = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv2C = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv3C = 0.0
            self.all_quadrant2_reactive_power_electricity_feilv4C = 0.0

            self.all_quadrant3_reactive_power_electricityC = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv1C = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv2C = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv3C = 0.0
            self.all_quadrant3_reactive_power_electricity_feilv4C = 0.0

            self.all_quadrant4_reactive_power_electricityC = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv1C = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv2C = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv3C = 0.0
            self.all_quadrant4_reactive_power_electricity_feilv4C = 0.0

        ###################################最大需求相关参数#########################################################
        #####################A##################################
		#视在正向最大需求
        try:
            self.all_watch_power_electricity_needA=float(self.read_all_data["all_watch_power_electricity_needA"])
        except:
            self.all_watch_power_electricity_needA = 0.0#最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeA = (self.read_all_data["all_watch_power_electricity_needtimeA"])
        except:
            self.all_watch_power_electricity_needtimeA = ""#最大需求的时间

        self.all_watch_power_electricity_needlistA = []  #list记录

        # 视在反向最大需求
        try:
            self.all_watch_power_electricity_needA1 = float(self.read_all_data["all_watch_power_electricity_needA1"])
        except:
            self.all_watch_power_electricity_needA1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeA1 = (self.read_all_data["all_watch_power_electricity_needtimeA1"])
        except:
            self.all_watch_power_electricity_needtimeA1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistA1 = []  # list记录


        # 有功正向最大需求
        try:
            self.all_active_power_electricity_needA = float(self.read_all_data["all_active_power_electricity_needA"])
        except:
            self.all_active_power_electricity_needA = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeA = (self.read_all_data["all_active_power_electricity_needtimeA"])
        except:
            self.all_active_power_electricity_needtimeA = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistA = []  # list记录

        # 有功反向最大需求
        try:
            self.all_active_power_electricity_needA1 = float(self.read_all_data["all_active_power_electricity_needA1"])
        except:
            self.all_active_power_electricity_needA1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeA1 = (self.read_all_data["all_active_power_electricity_needtimeA1"])
        except:
            self.all_active_power_electricity_needtimeA1 = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistA1 = []  # list记录

        # 第一象限最大需求
        try:
            self.all_quadrant1_reactive_power_electricity_needA = float(self.read_all_data["all_quadrant1_reactive_power_electricity_needA"])
        except:
            self.all_quadrant1_reactive_power_electricity_needA = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_needtimeA = (self.read_all_data["all_quadrant1_reactive_power_electricity_needtimeA"])
        except:
            self.all_quadrant1_reactive_power_electricity_needtimeA = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_needlistA = []  # list记录

        # 第二象限最大需求
        try:
            self.all_quadrant2_reactive_power_electricity_needA = float(self.read_all_data["all_quadrant2_reactive_power_electricity_needA"])
        except:
            self.all_quadrant2_reactive_power_electricity_needA = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_needtimeA = (self.read_all_data["all_quadrant2_reactive_power_electricity_needtimeA"])
        except:
            self.all_quadrant2_reactive_power_electricity_needtimeA = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_needlistA = []  # list记录

        # 第三象限最大需求
        try:
            self.all_quadrant3_reactive_power_electricity_needA = float(self.read_all_data["all_quadrant3_reactive_power_electricity_needA"])
        except:
            self.all_quadrant3_reactive_power_electricity_needA = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_needtimeA = (self.read_all_data["all_quadrant3_reactive_power_electricity_needtimeA"])
        except:
            self.all_quadrant3_reactive_power_electricity_needtimeA = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_needlistA = []  # list记录

        # 第四象限最大需求
        try:
            self.all_quadrant4_reactive_power_electricity_needA = float(self.read_all_data["all_quadrant4_reactive_power_electricity_needA"])
        except:
            self.all_quadrant4_reactive_power_electricity_needA = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_needtimeA = (self.read_all_data["all_quadrant4_reactive_power_electricity_needtimeA"])
        except:
            self.all_quadrant4_reactive_power_electricity_needtimeA = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_needlistA = []  # list记录

        # 无功组合1最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct1A = float( self.read_all_data["all_quadrant_reactive_power_electricity_needstruct1A"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct1A = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct1A = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct1A"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct1A = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct1A = []  # list记录

        # 无功组合2最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct2A = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct2A"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct2A = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct2A = (
                self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct2A"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct2A = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct2A = []  # list记录
        #####################B##################################
        # 视在正向最大需求
        try:
            self.all_watch_power_electricity_needB = float(self.read_all_data["all_watch_power_electricity_needB"])
        except:
            self.all_watch_power_electricity_needB = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeB = (self.read_all_data["all_watch_power_electricity_needtimeB"])
        except:
            self.all_watch_power_electricity_needtimeB = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistB = []  # list记录

        # 视在反向最大需求
        try:
            self.all_watch_power_electricity_needB1 = float(self.read_all_data["all_watch_power_electricity_needB1"])
        except:
            self.all_watch_power_electricity_needB1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeB1 = (self.read_all_data["all_watch_power_electricity_needtimeB1"])
        except:
            self.all_watch_power_electricity_needtimeB1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistB1 = []  # list记录

        # 有功正向最大需求
        try:
            self.all_active_power_electricity_needB = float(self.read_all_data["all_active_power_electricity_needB"])
        except:
            self.all_active_power_electricity_needB = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeB = (self.read_all_data["all_active_power_electricity_needtimeB"])
        except:
            self.all_active_power_electricity_needtimeB = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistB = []  # list记录

        # 有功反向最大需求
        try:
            self.all_active_power_electricity_needB1 = float(self.read_all_data["all_active_power_electricity_needB1"])
        except:
            self.all_active_power_electricity_needB1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeB1 = (self.read_all_data["all_active_power_electricity_needtimeB1"])
        except:
            self.all_active_power_electricity_needtimeB1 = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistB1 = []  # list记录

        # 第一象限最大需求
        try:
            self.all_quadrant1_reactive_power_electricity_needB = float(self.read_all_data["all_quadrant1_reactive_power_electricity_needB"])
        except:
            self.all_quadrant1_reactive_power_electricity_needB = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_needtimeB = (self.read_all_data["all_quadrant1_reactive_power_electricity_needtimeB"])
        except:
            self.all_quadrant1_reactive_power_electricity_needtimeB = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_needlistB = []  # list记录

        # 第二象限最大需求
        try:
            self.all_quadrant2_reactive_power_electricity_needB = float(self.read_all_data["all_quadrant2_reactive_power_electricity_needB"])
        except:
            self.all_quadrant2_reactive_power_electricity_needB = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_needtimeB = (self.read_all_data["all_quadrant2_reactive_power_electricity_needtimeB"])
        except:
            self.all_quadrant2_reactive_power_electricity_needtimeB = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_needlistB = []  # list记录

        # 第三象限最大需求
        try:
            self.all_quadrant3_reactive_power_electricity_needB = float(self.read_all_data["all_quadrant3_reactive_power_electricity_needB"])
        except:
            self.all_quadrant3_reactive_power_electricity_needB = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_needtimeB = (self.read_all_data["all_quadrant3_reactive_power_electricity_needtimeB"])
        except:
            self.all_quadrant3_reactive_power_electricity_needtimeB = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_needlistB = []  # list记录

        # 第四象限最大需求
        try:
            self.all_quadrant4_reactive_power_electricity_needB = float(self.read_all_data["all_quadrant4_reactive_power_electricity_needB"])
        except:
            self.all_quadrant4_reactive_power_electricity_needB = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_needtimeB = (self.read_all_data["all_quadrant4_reactive_power_electricity_needtimeB"])
        except:
            self.all_quadrant4_reactive_power_electricity_needtimeB = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_needlistB = []  # list记录

        # 无功组合1最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct1B = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct1B"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct1B = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct1B = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct1B"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct1B = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct1B = []  # list记录

        # 无功组合2最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct2B = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct2B"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct2B = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct2B = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct2B"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct2B = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct2B = []  # list记录
        #####################C##################################
        # 视在正向最大需求
        try:
            self.all_watch_power_electricity_needC = float(self.read_all_data["all_watch_power_electricity_needC"])
        except:
            self.all_watch_power_electricity_needC = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeC = (self.read_all_data["all_watch_power_electricity_needtimeC"])
        except:
            self.all_watch_power_electricity_needtimeC = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistC = []  # list记录

        # 视在反向最大需求
        try:
            self.all_watch_power_electricity_needC1 = float(self.read_all_data["all_watch_power_electricity_needC1"])
        except:
            self.all_watch_power_electricity_needC1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeC1 = (self.read_all_data["all_watch_power_electricity_needtimeC1"])
        except:
            self.all_watch_power_electricity_needtimeC1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistC1 = []  # list记录

        # 有功正向最大需求
        try:
            self.all_active_power_electricity_needC = float(self.read_all_data["all_active_power_electricity_needC"])
        except:
            self.all_active_power_electricity_needC = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeC = (self.read_all_data["all_active_power_electricity_needtimeC"])
        except:
            self.all_active_power_electricity_needtimeC = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistC = []  # list记录

        # 有功反向最大需求
        try:
            self.all_active_power_electricity_needC1 = float(self.read_all_data["all_active_power_electricity_needC1"])
        except:
            self.all_active_power_electricity_needC1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeC1 = (self.read_all_data["all_active_power_electricity_needtimeC1"])
        except:
            self.all_active_power_electricity_needtimeC1 = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistC1 = []  # list记录

        # 第一象限最大需求
        try:
            self.all_quadrant1_reactive_power_electricity_needC = float(self.read_all_data["all_quadrant1_reactive_power_electricity_needC"])
        except:
            self.all_quadrant1_reactive_power_electricity_needC = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_needtimeC = (self.read_all_data["all_quadrant1_reactive_power_electricity_needtimeC"])
        except:
            self.all_quadrant1_reactive_power_electricity_needtimeC = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_needlistC = []  # list记录

        # 第二象限最大需求
        try:
            self.all_quadrant2_reactive_power_electricity_needC = float(self.read_all_data["all_quadrant2_reactive_power_electricity_needC"])
        except:
            self.all_quadrant2_reactive_power_electricity_needC = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_needtimeC = (self.read_all_data["all_quadrant2_reactive_power_electricity_needtimeC"])
        except:
            self.all_quadrant2_reactive_power_electricity_needtimeC = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_needlistC = []  # list记录

        # 第三象限最大需求
        try:
            self.all_quadrant3_reactive_power_electricity_needC = float(self.read_all_data["all_quadrant3_reactive_power_electricity_needC"])
        except:
            self.all_quadrant3_reactive_power_electricity_needC = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_needtimeC = (self.read_all_data["all_quadrant3_reactive_power_electricity_needtimeC"])
        except:
            self.all_quadrant3_reactive_power_electricity_needtimeC = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_needlistC = []  # list记录

        # 第四象限最大需求
        try:
            self.all_quadrant4_reactive_power_electricity_needC = float(self.read_all_data["all_quadrant4_reactive_power_electricity_needC"])
        except:
            self.all_quadrant4_reactive_power_electricity_needC = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_needtimeC = (self.read_all_data["all_quadrant4_reactive_power_electricity_needtimeB"])
        except:
            self.all_quadrant4_reactive_power_electricity_needtimeC = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_needlistC = []  # list记录

        # 无功组合1最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct1C = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct1C"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct1C = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct1C = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct1C"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct1C = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct1C = []  # list记录
        # 无功组合2最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct2C = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct2C"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct2C = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct2C = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct2C"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct2C = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct2C = []  # list记录
        ################################全部的需量#########################################################
        # 视在正向最大需求
        try:
            self.all_watch_power_electricity_needALL = float(self.read_all_data["all_watch_power_electricity_needALL"])
        except:
            self.all_watch_power_electricity_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeALL = (self.read_all_data["all_watch_power_electricity_needtimeALL"])
        except:
            self.all_watch_power_electricity_needtimeALL = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistALL = []  # list记录

        # 费率1
        try:
            self.all_watch_power_electricity_feilv1_needALL=float(self.read_all_data["all_watch_power_electricity_feilv1_needALL"])
        except:
            self.all_watch_power_electricity_feilv1_needALL = 0.0#最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv1_needtimeALL = (self.read_all_data["all_watch_power_electricity_feilv1_needtimeALL"])
        except:
            self.all_watch_power_electricity_feilv1_needtimeALL = ""#最大需求的时间

        self.all_watch_power_electricity_feilv1_needlistALL = []  #list记录

        # 费率2
        try:
            self.all_watch_power_electricity_feilv2_needALL=float(self.read_all_data["all_watch_power_electricity_feilv2_needALL"])
        except:
            self.all_watch_power_electricity_feilv2_needALL = 0.0#最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv2_needtimeALL = (self.read_all_data["all_watch_power_electricity_feilv2_needtimeALL"])
        except:
            self.all_watch_power_electricity_feilv2_needtimeALL = ""#最大需求的时间

        self.all_watch_power_electricity_feilv2_needlistALL = []  #list记录

        # 费率3
        try:
            self.all_watch_power_electricity_feilv3_needALL=float(self.read_all_data["all_watch_power_electricity_feilv3_needALL"])
        except:
            self.all_watch_power_electricity_feilv3_needALL = 0.0#最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv3_needtimeALL = (self.read_all_data["all_watch_power_electricity_feilv3_needtimeALL"])
        except:
            self.all_watch_power_electricity_feilv3_needtimeALL = ""#最大需求的时间

        self.all_watch_power_electricity_feilv3_needlistALL = []  #list记录

        # 费率4
        try:
            self.all_watch_power_electricity_feilv4_needALL=float(self.read_all_data["all_watch_power_electricity_feilv4_needALL"])
        except:
            self.all_watch_power_electricity_feilv4_needALL = 0.0#最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv4_needtimeALL = (self.read_all_data["all_watch_power_electricity_feilv4_needtimeALL"])
        except:
            self.all_watch_power_electricity_feilv4_needtimeALL = ""#最大需求的时间

        self.all_watch_power_electricity_feilv4_needlistALL = []  #list记录

        # 视在反向最大需求
        try:
            self.all_watch_power_electricity_needALL1 = float(self.read_all_data["all_watch_power_electricity_needALL1"])
        except:
            self.all_watch_power_electricity_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_needtimeALL1 = (self.read_all_data["all_watch_power_electricity_needtimeALL1"])
        except:
            self.all_watch_power_electricity_needtimeALL1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_needlistALL1 = []  # list记录

        # 费率1
        try:
            self.all_watch_power_electricity_feilv1_needALL1 = float(self.read_all_data["all_watch_power_electricity_feilv1_needALL1"])
        except:
            self.all_watch_power_electricity_feilv1_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv1_needtimeALL1 = (self.read_all_data["all_watch_power_electricity_feilv1_needtimeALL1"])
        except:
            self.all_watch_power_electricity_feilv1_needtimeALL1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_feilv1_needlistALL1 = []  # list记录

        # 费率2
        try:
            self.all_watch_power_electricity_feilv2_needALL1 = float(self.read_all_data["all_watch_power_electricity_feilv2_needALL1"])
        except:
            self.all_watch_power_electricity_feilv2_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv2_needtimeALL1 = (self.read_all_data["all_watch_power_electricity_feilv2_needtimeALL1"])
        except:
            self.all_watch_power_electricity_feilv2_needtimeALL1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_feilv2_needlistALL1 = []  # list记录

        # 费率3
        try:
            self.all_watch_power_electricity_feilv3_needALL1 = float(self.read_all_data["all_watch_power_electricity_feilv3_needALL1"])
        except:
            self.all_watch_power_electricity_feilv3_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv3_needtimeALL1 = (self.read_all_data["all_watch_power_electricity_feilv3_needtimeALL1"])
        except:
            self.all_watch_power_electricity_feilv3_needtimeALL1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_feilv3_needlistALL1 = []  # list记录

        # 费率4
        try:
            self.all_watch_power_electricity_feilv4_needALL1 = float(self.read_all_data["all_watch_power_electricity_feilv4_needALL1"])
        except:
            self.all_watch_power_electricity_feilv4_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_watch_power_electricity_feilv4_needtimeALL1 = (self.read_all_data["all_watch_power_electricity_feilv4_needtimeALL1"])
        except:
            self.all_watch_power_electricity_feilv4_needtimeALL1 = ""  # 最大需求的时间

        self.all_watch_power_electricity_feilv4_needlistALL1 = []  # list记录


        # 有功正向最大需求
        try:
            self.all_active_power_electricity_needALL = float(self.read_all_data["all_active_power_electricity_needALL"])
        except:
            self.all_active_power_electricity_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeALL = (self.read_all_data["all_active_power_electricity_needtimeALL"])
        except:
            self.all_active_power_electricity_needtimeALL = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistALL = []  # list记录

        # 费率1
        try:
            self.all_active_power_electricity_feilv1_needALL = float(self.read_all_data["all_active_power_electricity_feilv1_needALL"])
        except:
            self.all_active_power_electricity_feilv1_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv1_needtimeALL = (self.read_all_data["all_active_power_electricity_feilv1_needtimeALL"])
        except:
            self.all_active_power_electricity_feilv1_needtimeALL = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv1_needlistALL = []  # list记录

        # 费率2
        try:
            self.all_active_power_electricity_feilv2_needALL = float(self.read_all_data["all_active_power_electricity_feilv2_needALL"])
        except:
            self.all_active_power_electricity_feilv2_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv2_needtimeALL = (self.read_all_data["all_active_power_electricity_feilv2_needtimeALL"])
        except:
            self.all_active_power_electricity_feilv2_needtimeALL = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv2_needlistALL = []  # list记录

        # 费率3
        try:
            self.all_active_power_electricity_feilv3_needALL = float(self.read_all_data["all_active_power_electricity_feilv3_needALL"])
        except:
            self.all_active_power_electricity_feilv3_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv3_needtimeALL = (self.read_all_data["all_active_power_electricity_feilv3_needtimeALL"])
        except:
            self.all_active_power_electricity_feilv3_needtimeALL = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv3_needlistALL = []  # list记录

        # 费率4
        try:
            self.all_active_power_electricity_feilv4_needALL = float(self.read_all_data["all_active_power_electricity_feilv4_needALL"])
        except:
            self.all_active_power_electricity_feilv4_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv4_needtimeALL = (self.read_all_data["all_active_power_electricity_feilv4_needtimeALL"])
        except:
            self.all_active_power_electricity_feilv4_needtimeALL = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv4_needlistALL = []  # list记录

        # 有功反向最大需求
        try:
            self.all_active_power_electricity_needALL1 = float(self.read_all_data["all_active_power_electricity_needALL1"])
        except:
            self.all_active_power_electricity_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_needtimeALL1 = (self.read_all_data["all_active_power_electricity_needtimeALL1"])
        except:
            self.all_active_power_electricity_needtimeALL1 = ""  # 最大需求的时间

        self.all_active_power_electricity_needlistALL1 = []  # list记录

        # 费率1
        try:
            self.all_active_power_electricity_feilv1_needALL1 = float(self.read_all_data["all_active_power_electricity_feilv1_needALL1"])
        except:
            self.all_active_power_electricity_feilv1_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv1_needtimeALL1 = (self.read_all_data["all_active_power_electricity_feilv1_needtimeALL1"])
        except:
            self.all_active_power_electricity_feilv1_needtimeALL1 = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv1_needlistALL1 = []  # list记录

        # 费率2
        try:
            self.all_active_power_electricity_feilv2_needALL1 = float(self.read_all_data["all_active_power_electricity_feilv2_needALL1"])
        except:
            self.all_active_power_electricity_feilv2_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv2_needtimeALL1 = (self.read_all_data["all_active_power_electricity_feilv2_needtimeALL1"])
        except:
            self.all_active_power_electricity_feilv2_needtimeALL1 = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv2_needlistALL1 = []  # list记录

        # 费率3
        try:
            self.all_active_power_electricity_feilv3_needALL1 = float(self.read_all_data["all_active_power_electricity_feilv3_needALL1"])
        except:
            self.all_active_power_electricity_feilv3_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv3_needtimeALL1 = (self.read_all_data["all_active_power_electricity_feilv3_needtimeALL1"])
        except:
            self.all_active_power_electricity_feilv3_needtimeALL1 = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv3_needlistALL1 = []  # list记录

        # 费率4
        try:
            self.all_active_power_electricity_feilv4_needALL1 = float(self.read_all_data["all_active_power_electricity_feilv4_needALL1"])
        except:
            self.all_active_power_electricity_feilv4_needALL1 = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_active_power_electricity_feilv4_needtimeALL1 = (self.read_all_data["all_active_power_electricity_feilv4_needtimeALL1"])
        except:
            self.all_active_power_electricity_feilv4_needtimeALL1 = ""  # 最大需求的时间

        self.all_active_power_electricity_feilv4_needlistALL1 = []  # list记录


        # 第一象限最大需求
        try:
            self.all_quadrant1_reactive_power_electricity_needALL = float(self.read_all_data["all_quadrant1_reactive_power_electricity_needALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_needtimeALL = (self.read_all_data["all_quadrant1_reactive_power_electricity_needtimeALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_needtimeALL = ""  # 最大需求的时间
        self.all_quadrant1_reactive_power_electricity_needlistALL = []  # list记录

        # 费率1
        try:
            self.all_quadrant1_reactive_power_electricity_feilv1_needALL = float(self.read_all_data["all_quadrant1_reactive_power_electricity_feilv1_needALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv1_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_feilv1_needtimeALL = (self.read_all_data["all_quadrant1_reactive_power_electricity_feilv1_needtimeALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv1_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_feilv1_needlistALL = []  # list记录

        # 费率2
        try:
            self.all_quadrant1_reactive_power_electricity_feilv2_needALL = float(self.read_all_data["all_quadrant1_reactive_power_electricity_feilv2_needALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv2_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_feilv2_needtimeALL = (self.read_all_data["all_quadrant1_reactive_power_electricity_feilv2_needtimeALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv2_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_feilv2_needlistALL = []  # list记录

        # 费率3
        try:
            self.all_quadrant1_reactive_power_electricity_feilv3_needALL = float(self.read_all_data["all_quadrant1_reactive_power_electricity_feilv3_needALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv3_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_feilv3_needtimeALL = (self.read_all_data["all_quadrant1_reactive_power_electricity_feilv3_needtimeALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv3_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_feilv3_needlistALL = []  # list记录

        # 费率4
        try:
            self.all_quadrant1_reactive_power_electricity_feilv4_needALL = float(self.read_all_data["all_quadrant1_reactive_power_electricity_feilv4_needALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv4_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant1_reactive_power_electricity_feilv4_needtimeALL = (self.read_all_data["all_quadrant1_reactive_power_electricity_feilv4_needtimeALL"])
        except:
            self.all_quadrant1_reactive_power_electricity_feilv4_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant1_reactive_power_electricity_feilv4_needlistALL = []  # list记录

        # 第二象限最大需求
        try:
            self.all_quadrant2_reactive_power_electricity_needALL = float(self.read_all_data["all_quadrant2_reactive_power_electricity_needALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_needtimeALL = (self.read_all_data["all_quadrant2_reactive_power_electricity_needtimeALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_needtimeALL = ""  # 最大需求的时间
        self.all_quadrant2_reactive_power_electricity_needlistALL = []  # list记录

        # 费率1
        try:
            self.all_quadrant2_reactive_power_electricity_feilv1_needALL = float(self.read_all_data["all_quadrant2_reactive_power_electricity_feilv1_needALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv1_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_feilv1_needtimeALL = (self.read_all_data["all_quadrant2_reactive_power_electricity_feilv1_needtimeALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv1_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_feilv1_needlistALL = []  # list记录

        # 费率2
        try:
            self.all_quadrant2_reactive_power_electricity_feilv2_needALL = float(self.read_all_data["all_quadrant2_reactive_power_electricity_feilv2_needALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv2_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_feilv2_needtimeALL = (self.read_all_data["all_quadrant2_reactive_power_electricity_feilv2_needtimeALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv2_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_feilv2_needlistALL = []  # list记录

        # 费率3
        try:
            self.all_quadrant2_reactive_power_electricity_feilv3_needALL = float(self.read_all_data["all_quadrant2_reactive_power_electricity_feilv3_needALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv3_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_feilv3_needtimeALL = (self.read_all_data["all_quadrant2_reactive_power_electricity_feilv3_needtimeALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv3_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_feilv3_needlistALL = []  # list记录

        # 费率4
        try:
            self.all_quadrant2_reactive_power_electricity_feilv4_needALL = float(self.read_all_data["all_quadrant2_reactive_power_electricity_feilv4_needALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv4_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant2_reactive_power_electricity_feilv4_needtimeALL = (self.read_all_data["all_quadrant2_reactive_power_electricity_feilv4_needtimeALL"])
        except:
            self.all_quadrant2_reactive_power_electricity_feilv4_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant2_reactive_power_electricity_feilv4_needlistALL = []  # list记录

        # 第三象限最大需求
        try:
            self.all_quadrant3_reactive_power_electricity_needALL = float(self.read_all_data["all_quadrant3_reactive_power_electricity_needALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_needtimeALL = (self.read_all_data["all_quadrant3_reactive_power_electricity_needtimeALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_needtimeALL = ""  # 最大需求的时间
        self.all_quadrant3_reactive_power_electricity_needlistALL = []  # list记录

        # 费率1
        try:
            self.all_quadrant3_reactive_power_electricity_feilv1_needALL = float(self.read_all_data["all_quadrant3_reactive_power_electricity_feilv1_needALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv1_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_feilv1_needtimeALL = (self.read_all_data["all_quadrant3_reactive_power_electricity_feilv1_needtimeALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv1_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_feilv1_needlistALL = []  # list记录

        # 费率2
        try:
            self.all_quadrant3_reactive_power_electricity_feilv2_needALL = float(self.read_all_data["all_quadrant3_reactive_power_electricity_feilv2_needALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv2_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_feilv2_needtimeALL = (self.read_all_data["all_quadrant3_reactive_power_electricity_feilv2_needtimeALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv2_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_feilv2_needlistALL = []  # list记录

        # 费率3
        try:
            self.all_quadrant3_reactive_power_electricity_feilv3_needALL = float(self.read_all_data["all_quadrant3_reactive_power_electricity_feilv3_needALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv3_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_feilv3_needtimeALL = (self.read_all_data["all_quadrant3_reactive_power_electricity_feilv3_needtimeALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv3_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_feilv3_needlistALL = []  # list记录

        # 费率4
        try:
            self.all_quadrant3_reactive_power_electricity_feilv4_needALL = float(self.read_all_data["all_quadrant3_reactive_power_electricity_feilv4_needALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv4_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant3_reactive_power_electricity_feilv4_needtimeALL = (self.read_all_data["all_quadrant3_reactive_power_electricity_feilv4_needtimeALL"])
        except:
            self.all_quadrant3_reactive_power_electricity_feilv4_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant3_reactive_power_electricity_feilv4_needlistALL = []  # list记录

        # 第四象限最大需求
        try:
            self.all_quadrant4_reactive_power_electricity_needALL = float(self.read_all_data["all_quadrant4_reactive_power_electricity_needALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_needtimeALL = (self.read_all_data["all_quadrant4_reactive_power_electricity_needtimeALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_needtimeALL = ""  # 最大需求的时间
        self.all_quadrant4_reactive_power_electricity_needlistALL = []  # list记录

        # 费率1
        try:
            self.all_quadrant4_reactive_power_electricity_feilv1_needALL = float(self.read_all_data["all_quadrant4_reactive_power_electricity_feilv1_needALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv1_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_feilv1_needtimeALL = (self.read_all_data["all_quadrant4_reactive_power_electricity_feilv1_needtimeALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv1_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_feilv1_needlistALL = []  # list记录

        # 费率2
        try:
            self.all_quadrant4_reactive_power_electricity_feilv2_needALL = float(self.read_all_data["all_quadrant4_reactive_power_electricity_feilv2_needALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv2_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_feilv2_needtimeALL = (self.read_all_data["all_quadrant4_reactive_power_electricity_feilv2_needtimeALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv2_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_feilv2_needlistALL = []  # list记录

        # 费率3
        try:
            self.all_quadrant4_reactive_power_electricity_feilv3_needALL = float(self.read_all_data["all_quadrant4_reactive_power_electricity_feilv3_needALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv3_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_feilv3_needtimeALL = (self.read_all_data["all_quadrant4_reactive_power_electricity_feilv3_needtimeALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv3_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_feilv3_needlistALL = []  # list记录

        # 费率4
        try:
            self.all_quadrant4_reactive_power_electricity_feilv4_needALL = float(self.read_all_data["all_quadrant4_reactive_power_electricity_feilv4_needALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv4_needALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant4_reactive_power_electricity_feilv4_needtimeALL = (self.read_all_data["all_quadrant4_reactive_power_electricity_feilv4_needtimeALL"])
        except:
            self.all_quadrant4_reactive_power_electricity_feilv4_needtimeALL = ""  # 最大需求的时间

        self.all_quadrant4_reactive_power_electricity_feilv4_needlistALL = []  # list记录

        # 无功组合1最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct1ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct1ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct1ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct1ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct1ALL = []  # list记录

        # 费率1
        try:
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL = []  # list记录

        # 费率2
        try:
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL = []  # list记录

        # 费率3
        try:
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL = []  # list记录

        # 费率4
        try:
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL = []  # list记录

        # 无功组合2最大需求
        try:
            self.all_quadrant_reactive_power_electricity_needstruct2ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_needstruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_needstruct2ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_needtimestruct2ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_needtimestruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_needtimestruct2ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_needliststruct2ALL = []  # list记录

        # 费率1
        try:
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL = []  # list记录

        # 费率2
        try:
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL = []  # list记录

        # 费率3
        try:
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL = []  # list记录

        # 费率4
        try:
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL = float(self.read_all_data["all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL = 0.0  # 最大需求

        # 最大需求时间
        try:
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL = (self.read_all_data["all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL"])
        except:
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL = ""  # 最大需求的时间

        self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL = []  # list记录
        #########################################################################################
        self.power_need_index=0#组的编号

    ####计算的各函数###############################################################
    #视在电能
    def dianbiao_watch_power_calculate(self,voltage,current):
        return voltage * current
    # 一分钟视在电量
    def dianbiao_watch_power_electricity_calculate(self, voltage, current):
        return self.dianbiao_watch_power_calculate(voltage, current) * self.electricity_time / 3600000

    # 有功电能
    def dianbiao_active_power_calculate(self,voltage,current,power_factor):
        return voltage * current * power_factor
    # 一分钟有功电量
    def dianbiao_active_power_electricity_calculate(self,voltage,current,power_factor):
        return self.dianbiao_active_power_calculate(voltage,current,power_factor) * self.electricity_time / 3600000

    #无功电能
    def dianbiao_reactive_power_calculate(self, voltage, current, power_factor):
        tmp2tmp = voltage * voltage * current * current * (
                1 - power_factor * power_factor)

        # 当前无功功率
        return math.sqrt(tmp2tmp)
    # 一分钟无功电量
    def dianbiao_reactive_power_electricity_calculate(self, voltage, current, power_factor):
        return self.dianbiao_reactive_power_calculate(voltage,current,power_factor) * self.electricity_time / 3600000
########################################################################################################################
    #cold_data_read
    #读保存的数据
    #
    def cold_data_read(self):
        if os.path.exists(self.address):
            pass
        else:
            os.mkdir(self.address)

        if ((platform.system()[0] == "W")or(platform.system()[0] == "w")):
            self.dir_pwd = self.address + "\\"
        else:
            self.dir_pwd = self.address + "/"
        try:
            with open(self.dir_pwd+self.address+".json", "r") as f:
                self.read_all_data= eval(f.read())
                f.close()
        except:
            pass
        if os.path.exists(self.dir_pwd+'log'):
            pass
        else:
            os.mkdir(self.dir_pwd+'log')
        if os.path.exists(self.dir_pwd+'cold'):
            pass
        else:
            os.mkdir(self.dir_pwd+'cold')
        #########################################
        if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
            tmp_cold_pwd = self.dir_pwd+'cold'+ "\\"
        else:
            tmp_cold_pwd = self.dir_pwd+'cold'+ "/"
        # 日
        if os.path.exists(tmp_cold_pwd + 'day'):
            pass
        else:
            os.mkdir(tmp_cold_pwd + 'day')
        #整点
        if os.path.exists(tmp_cold_pwd+'hour'):
            pass
        else:
            os.mkdir(tmp_cold_pwd+'hour')
        #时
        if os.path.exists(tmp_cold_pwd+'min'):
            pass
        else:
            os.mkdir(tmp_cold_pwd+'min')
        # 定时
        if os.path.exists(tmp_cold_pwd + 'set_time'):
            pass
        else:
            os.mkdir(tmp_cold_pwd + 'set_time')
        # 瞬时
        if os.path.exists(tmp_cold_pwd + 'cmd_time'):
            pass
        else:
            os.mkdir(tmp_cold_pwd + 'cmd_time')
    #cold_data_write
    #写保存的数据
    #
    def cold_data_write(self):
        try:
            with open(self.dir_pwd+self.address+".json", "w") as f:
                f.write(str(self.write_all_data))
                f.close()
        except:
            pass

    # cold_data_write_sp_day
    # 写保存的数据 带时间标志
    ## 日 冻结
    def cold_data_write_sp_day(self,time_tmp):
        if ((platform.system()[0] == "W")or(platform.system()[0] == "w")):
            dir_pwd_tmp = self.dir_pwd+"cold"+ "\\"+"day"+"\\"
        else:
            dir_pwd_tmp = self.dir_pwd+"cold"+ "/"+"day"+"/"
        try:
            with open(dir_pwd_tmp+time_tmp+".json", "w") as f:
                f.write(str(self.write_all_data))
                f.close()
        except:
            pass
    # cold_data_write_sp_hour
    # 写保存的数据 带时间标志
    #整点 冻结
    def cold_data_write_sp_hour(self,time_tmp):
        if ((platform.system()[0] == "W")or(platform.system()[0] == "w")):
            dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "hour" + "\\"
        else:
            dir_pwd_tmp = self.dir_pwd + "cold" + "/" + "hour" + "/"
        try:
            with open(dir_pwd_tmp+time_tmp+".json", "w") as f:
                f.write(str(self.write_all_data))
                f.close()
        except:
            pass
    # cold_data_write_sp_min
    # 写保存的数据 带时间标志
    #分钟 冻结
    def cold_data_write_sp_min(self,time_tmp):
        if ((platform.system()[0] == "W")or(platform.system()[0] == "w")):
            dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "min" + "\\"
        else:
            dir_pwd_tmp = self.dir_pwd + "cold" + "/" + "min" + "/"
        try:
            with open(dir_pwd_tmp+time_tmp+".json", "w") as f:
                f.write(str(self.write_all_data))
                f.close()
        except:
            pass

    # cold_data_write_sp_set_time
    # 写保存的数据 带时间标志
    # 定时 冻结
    def cold_data_write_sp_set_time(self, time_tmp):
        if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
            dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        else:
            dir_pwd_tmp = self.dir_pwd + "cold" + "/" + "set_time" + "/"
        try:
            with open(dir_pwd_tmp + time_tmp + ".json", "w") as f:
                f.write(str(self.write_all_data))
                f.close()
        except:
            pass
    # cold_data_write_sp_cmd_time
    # 写保存的数据 带时间标志
    # 瞬时 冻结
    def cold_data_write_sp_cmd_time(self, time_tmp):
        if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
            dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "cmd_time" + "\\"
        else:
            dir_pwd_tmp = self.dir_pwd + "cold" + "/" + "cmd_time" + "/"
        try:
            with open(dir_pwd_tmp + time_tmp + ".json", "w") as f:
                f.write(str(self.write_all_data))
                f.close()
        except:
            pass
    # cold_data_write_log
    # 每分钟保存log数据
    #
    def cold_data_write_log(self, time_tmp,log_str):
        if ((platform.system()[0] == "W")or(platform.system()[0] == "w")):
            dir_pwd_tmp = self.dir_pwd+"log"+ "\\"
        else:
            dir_pwd_tmp = self.dir_pwd+"log"+ "/"
        try:
            with open(dir_pwd_tmp + time_tmp + "_log.csv", "a") as f:
                f.write(log_str)
                f.close()
        except:
            pass
########################show######################################################
    # 显示电压A
    #
    def dianbiao_voltage_showA(self):
        return self.voltageA
    # 显示电压B
    #
    def dianbiao_voltage_showB(self):
        return self.voltageB
    # 显示电压C
    #
    def dianbiao_voltage_showC(self):
        return self.voltageC
    # 显示电流A
    #
    def dianbiao_current_showA(self):
        return self.currentA
    # 显示电流B
    #
    def dianbiao_current_showB(self):
        return self.currentB
    # 显示电流C
    #
    def dianbiao_current_showC(self):
        return self.currentC
    # 显示功率因子A
    #
    def dianbiao_power_factor_showA(self):
        return self.power_factorA
    # 显示功率因子B
    #
    def dianbiao_power_factor_showB(self):
        return self.power_factorB
    # 显示功率因子C
    #
    def dianbiao_power_factor_showC(self):
        return self.power_factorC
    # 显示功率因子ALL
    #
    def dianbiao_power_factor_showALL(self):
        return self.power_factorALL
    # 显示频率
    #
    def dianbiao_frequency_show(self):
        return self.frequency

    # 显示地址
    #
    def dianbiao_addres_show(self):
        return self.address

    # 显示开始时间
    #
    def dianbiao_time_show(self):
        return self.star_time

    # 显示最大电流
    #
    def dianbiao_max_current_show(self):
        return self.max_current

    # 视在电能A
    #
    def dianbiao_watch_power_showA(self):
        return self.dianbiao_watch_power_calculate(self.voltageA,self.currentA)

    # 视在电能A
    #
    def dianbiao_watch_power_showB(self):
        return self.dianbiao_watch_power_calculate(self.voltageB, self.currentB)

    # 视在电能C
    #
    def dianbiao_watch_power_showC(self):
        return self.dianbiao_watch_power_calculate(self.voltageC, self.currentC)

    # 视在电能ALL
    #
    def dianbiao_watch_power_showALL(self):
        watch_power_tmpA = self.dianbiao_watch_power_calculate(self.voltageA,self.currentA)
        watch_power_tmpB = self.dianbiao_watch_power_calculate(self.voltageB, self.currentB)
        watch_power_tmpC = self.dianbiao_watch_power_calculate(self.voltageC, self.currentC)
        watch_power_tmpALL = watch_power_tmpA + watch_power_tmpB + watch_power_tmpC
        return watch_power_tmpALL
    # 全部正向视在电量A
    #
    def dianbiao_all_watch_power_electricity_showA(self):
        return self.all_watch_power_electricityA

    # 全部反向视在电量A
    #
    def dianbiao_all_watch_power_electricity_showA1(self):
        return self.all_watch_power_electricityA1

    # 全部正向视在电量B
    #
    def dianbiao_all_watch_power_electricity_showB(self):
        return self.all_watch_power_electricityB

    # 全部反向视在电量B
    #
    def dianbiao_all_watch_power_electricity_showB1(self):
        return self.all_watch_power_electricityB1

    # 全部正向视在电量C
    #
    def dianbiao_all_watch_power_electricity_showC(self):
        return self.all_watch_power_electricityC

    # 全部反向视在电量C
    #
    def dianbiao_all_watch_power_electricity_showC1(self):
        return self.all_watch_power_electricityC1
    # 全部正向视在电量ALL
    #
    def dianbiao_all_watch_power_electricity_showALL(self):
        return self.all_watch_power_electricityA+self.all_watch_power_electricityB+self.all_watch_power_electricityC

    # 全部反向视在电量ALL
    #
    def dianbiao_all_watch_power_electricity_showALL1(self):
        return self.all_watch_power_electricityA1+self.all_watch_power_electricityB1+self.all_watch_power_electricityC1

    # 有功电能A
    #
    def dianbiao_active_power_showA(self):
        active_power_tmp=self.dianbiao_active_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        #if(self.activeA_way):
        #    active_power_tmp=-active_power_tmp
        return active_power_tmp
    # 有功电能B
    #
    def dianbiao_active_power_showB(self):
        active_power_tmp = self.dianbiao_active_power_calculate(self.voltageB, self.currentB, self.power_factorB)
        #if (self.activeB_way):
        #    active_power_tmp = -active_power_tmp
        return active_power_tmp
    # 有功电能C
    #
    def dianbiao_active_power_showC(self):
        active_power_tmp = self.dianbiao_active_power_calculate(self.voltageC, self.currentC, self.power_factorC)
        #if (self.activeC_way):
        #    active_power_tmp = -active_power_tmp
        return active_power_tmp
    # 有功电能ALL
    #
    def dianbiao_active_power_showALL(self):
        active_power_tmpA = self.dianbiao_active_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        active_power_tmpB = self.dianbiao_active_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        active_power_tmpC = self.dianbiao_active_power_calculate(self.voltageC,self.currentC,self.power_factorC)
        active_power_tmpALL=active_power_tmpA+active_power_tmpB+active_power_tmpC

        return active_power_tmpALL
    # 一分钟的有功电能A
    #
    def dianbiao_active_power_electricity_showA(self):
        active_power_electricity_tmp=self.dianbiao_active_power_electricity_calculate(self.voltageA,self.currentA,self.power_factorA)
        #if (self.activeA_way):
        #    active_power_electricity_tmp += -active_power_electricity_tmp
        return active_power_electricity_tmp
    # 一分钟的有功电能B
    #
    def dianbiao_active_power_electricity_showB(self):
        active_power_electricity_tmp = self.dianbiao_active_power_electricity_calculate(self.voltageB, self.currentB,
                                                                                        self.power_factorB)
        #if (self.activeB_way):
        #    active_power_electricity_tmp += -active_power_electricity_tmp
        return active_power_electricity_tmp
    # 一分钟的有功电能C
    #
    def dianbiao_active_power_electricity_showC(self):
        active_power_electricity_tmp = self.dianbiao_active_power_electricity_calculate(self.voltageC, self.currentC,
                                                                                        self.power_factorC)
        #if (self.activeC_way):
        #    active_power_electricity_tmp += -active_power_electricity_tmp
        return active_power_electricity_tmp

    # 一分钟的有功电能ALL
    #
    def dianbiao_active_power_electricity_showALL(self):
        active_power_electricity_tmpA = self.dianbiao_active_power_electricity_calculate(self.voltageA,self.currentA,self.power_factorA)
        active_power_electricity_tmpB = self.dianbiao_active_power_electricity_calculate(self.voltageB,self.currentB,self.power_factorB)
        active_power_electricity_tmpC = self.dianbiao_active_power_electricity_calculate(self.voltageC,self.currentC,self.power_factorC)
        active_power_electricity_tmpALL = active_power_electricity_tmpA+active_power_electricity_tmpB+active_power_electricity_tmpC

        return active_power_electricity_tmpALL

    # 全部正向有功电量A
    #
    def dianbiao_all_active_power_electricity_showA(self):
        return self.all_active_power_electricityA

    # 全部反向有功电量A
    #
    def dianbiao_all_active_power_electricity_showA1(self):
        return self.all_active_power_electricityA1

    # 全部正向有功电量B
    #
    def dianbiao_all_active_power_electricity_showB(self):
        return self.all_active_power_electricityB

    # 全部反向向有功电量B
    #
    def dianbiao_all_active_power_electricity_showB1(self):
        return self.all_active_power_electricityB1


    # 全部正向有功电量C
    #
    def dianbiao_all_active_power_electricity_showC(self):
        return self.all_active_power_electricityC

    # 全部反向向有功电量C
    #
    def dianbiao_all_active_power_electricity_showC1(self):
        return self.all_active_power_electricityC1

    # 全部正向有功电量ALL
    #
    def dianbiao_all_active_power_electricity_showALL(self):
        return self.all_active_power_electricityA+self.all_active_power_electricityB+self.all_active_power_electricityC

    # 全部反向有功电量ALL
    #
    def dianbiao_all_active_power_electricity_showALL1(self):
        return self.all_active_power_electricityA1 + self.all_active_power_electricityB1 + self.all_active_power_electricityC1

	# 全部组合有功电量ALL
    #
    def dianbiao_all_active_power_electricity_showSTURCT(self):
        active_power_tmp=self.all_active_power_electricityA + self.all_active_power_electricityB + self.all_active_power_electricityC-(self.all_active_power_electricityA1 + self.all_active_power_electricityB1 + self.all_active_power_electricityC1)
        return active_power_tmp

    # 无功电能A
    #
    def dianbiao_reactive_power_showA(self):
        reactive_power_tmp=self.dianbiao_reactive_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        #if(self.reactiveA_way):
        #    reactive_power_tmp=-reactive_power_tmp
        return reactive_power_tmp

    # 无功电能B
    #
    def dianbiao_reactive_power_showB(self):
        reactive_power_tmp = self.dianbiao_reactive_power_calculate(self.voltageB, self.currentB, self.power_factorB)
        #if (self.reactiveB_way):
        #    reactive_power_tmp = -reactive_power_tmp
        return reactive_power_tmp

    # 无功电能C
    #
    def dianbiao_reactive_power_showC(self):
        reactive_power_tmp = self.dianbiao_reactive_power_calculate(self.voltageC, self.currentC, self.power_factorC)
        #if (self.reactiveC_way):
        #    reactive_power_tmp = -reactive_power_tmp
        return reactive_power_tmp

    # 无功电能ALL
    #
    def dianbiao_reactive_power_showALL(self):
        reactive_power_tmpA  = self.dianbiao_reactive_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        reactive_power_tmpB  = self.dianbiao_reactive_power_calculate(self.voltageB, self.currentB, self.power_factorB)
        reactive_power_tmpC  = self.dianbiao_reactive_power_calculate(self.voltageC, self.currentC, self.power_factorC)
        reactive_power_tmpALL=reactive_power_tmpA+reactive_power_tmpB+reactive_power_tmpC

        return reactive_power_tmpALL

    # 一分钟的无功电量A
    #
    def dianbiao_reactive_power_electricity_showA(self):
        reactive_power_electricity_tmp=self.dianbiao_reactive_power_electricity_calculate(self.voltageA, self.currentA, self.power_factorA)
        #if(self.reactiveA_way):
        #    reactive_power_electricity_tmp=-reactive_power_electricity_tmp
        return reactive_power_electricity_tmp
    # 一分钟的无功电能B
    #
    def dianbiao_reactive_power_electricity_showB(self):
        reactive_power_electricity_tmp = self.dianbiao_reactive_power_electricity_calculate(self.voltageB,
                                                                                            self.currentB,
                                                                                            self.power_factorB)
        #if (self.reactiveB_way):
        #    reactive_power_electricity_tmp = -reactive_power_electricity_tmp
        return reactive_power_electricity_tmp
    # 一分钟的无功电能C
    #
    def dianbiao_reactive_power_electricity_showC(self):
        reactive_power_electricity_tmp = self.dianbiao_reactive_power_electricity_calculate(self.voltageC,
                                                                                            self.currentC,
                                                                                            self.power_factorC)
        #if (self.reactiveC_way):
        #    reactive_power_electricity_tmp = -reactive_power_electricity_tmp
        return reactive_power_electricity_tmp

    # 一分钟的无功电能ALL
    #
    def dianbiao_reactive_power_electricity_showALL(self):
        reactive_power_electricity_tmpA = self.dianbiao_reactive_power_electricity_calculate(self.voltageA, self.currentA, self.power_factorA)
        reactive_power_electricity_tmpB = self.dianbiao_reactive_power_electricity_calculate(self.voltageB,
                                                                                            self.currentB,
                                                                                            self.power_factorB)
        reactive_power_electricity_tmpC= self.dianbiao_reactive_power_electricity_calculate(self.voltageC,
                                                                                            self.currentC,
                                                                                            self.power_factorC)
        reactive_power_electricity_tmpALL=reactive_power_electricity_tmpA+reactive_power_electricity_tmpB+reactive_power_electricity_tmpC

        return reactive_power_electricity_tmpALL

########################################################################################################################################
    # 费率1 A 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showA(self):
        return self.all_watch_power_electricity_feilv1A

    # 费率1 A 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showA1(self):
        return self.all_watch_power_electricity_feilv1A1

    # 费率1 A 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showA(self):
        return self.all_active_power_electricity_feilv1A

    # 费率1 A 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showA1(self):
        return self.all_active_power_electricity_feilv1A1

    # 费率1 B 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showB(self):
        return self.all_watch_power_electricity_feilv1B

    # 费率1 B 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showB1(self):
        return self.all_watch_power_electricity_feilv1B1

    # 费率1 B 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showB(self):
        return self.all_active_power_electricity_feilv1B

    # 费率1 B 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showB1(self):
        return self.all_active_power_electricity_feilv1B1

    # 费率1 C 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showC(self):
        return self.all_watch_power_electricity_feilv1C

    # 费率1 C 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showC1(self):
        return self.all_watch_power_electricity_feilv1C1

    # 费率1 C 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showC(self):
        return self.all_active_power_electricity_feilv1C

    # 费率1 C 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showC1(self):
        return self.all_active_power_electricity_feilv1C1

    # 费率1 ALL 正向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showALL(self):
        return self.all_watch_power_electricity_feilv1A+self.all_watch_power_electricity_feilv1B+self.all_watch_power_electricity_feilv1C
    # 费率1 ALL 反向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv1_showALL1(self):
        return self.all_watch_power_electricity_feilv1A1+self.all_watch_power_electricity_feilv1B1+self.all_watch_power_electricity_feilv1C1

    # 费率1 ALL 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showALL(self):
        return self.all_active_power_electricity_feilv1A+self.all_active_power_electricity_feilv1B+self.all_active_power_electricity_feilv1C

    # 费率1 ALL 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showALL1(self):
        return self.all_active_power_electricity_feilv1A1+self.all_active_power_electricity_feilv1B1+self.all_active_power_electricity_feilv1C1

    # 费率1 组合全部有功电量
    #

    def dianbiao_active_power_electricity_feilv1_showSTRUCT(self):
        tmp = self.all_active_power_electricity_feilv1A + self.all_active_power_electricity_feilv1B + self.all_active_power_electricity_feilv1C
        tmp -= (
                self.all_active_power_electricity_feilv1A1 + self.all_active_power_electricity_feilv1B1 + self.all_active_power_electricity_feilv1C1)
        return tmp

    # 费率2 A 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showA(self):
        return self.all_watch_power_electricity_feilv2A

    # 费率2 A 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showA1(self):
        return self.all_watch_power_electricity_feilv2A1

    # 费率2 A 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showA(self):
        return self.all_active_power_electricity_feilv2A

    # 费率2 A 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv1_showA2(self):
        return self.all_active_power_electricity_feilv2A1

    # 费率2 B 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showB(self):
        return self.all_watch_power_electricity_feilv2B

    # 费率2 B 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showB1(self):
        return self.all_watch_power_electricity_feilv2B1
    # 费率2 B 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showB(self):
        return self.all_active_power_electricity_feilv2B

    # 费率2 B 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showB1(self):
        return self.all_active_power_electricity_feilv2B1

    # 费率2 C 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showC(self):
        return self.all_watch_power_electricity_feilv2C

    # 费率2 C 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showC1(self):
        return self.all_watch_power_electricity_feilv2C1
    # 费率2 C 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showC(self):
        return self.all_active_power_electricity_feilv2C

    # 费率2 C 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showC1(self):
        return self.all_active_power_electricity_feilv2C1

    # 费率2 ALL 正向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showALL(self):
        return self.all_watch_power_electricity_feilv2A+self.all_watch_power_electricity_feilv2B+self.all_watch_power_electricity_feilv2C
    # 费率2 ALL 反向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv2_showALL1(self):
        return self.all_watch_power_electricity_feilv2A1+self.all_watch_power_electricity_feilv2B1+self.all_watch_power_electricity_feilv2C1

    # 费率2 ALL 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showALL(self):
        return self.all_active_power_electricity_feilv2A + self.all_active_power_electricity_feilv2B + self.all_active_power_electricity_feilv2C

    # 费率2 ALL 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showALL1(self):
        return self.all_active_power_electricity_feilv2A1 + self.all_active_power_electricity_feilv2B1 + self.all_active_power_electricity_feilv2C1

    # 费率2 组合全部有功电量
    #
    def dianbiao_active_power_electricity_feilv2_showSTRUCT(self):
        tmp = self.all_active_power_electricity_feilv2A + self.all_active_power_electricity_feilv2B + self.all_active_power_electricity_feilv2C
        tmp -= (
                    self.all_active_power_electricity_feilv2A1 + self.all_active_power_electricity_feilv2B1 + self.all_active_power_electricity_feilv2C1)
        return tmp
    # 费率3 A 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showA(self):
        return self.all_watch_power_electricity_feilv3A

    # 费率3 A 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showA1(self):
        return self.all_watch_power_electricity_feilv3A1
    # 费率3 A 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showA(self):
        return self.all_active_power_electricity_feilv3A

    # 费率3 A 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showA1(self):
        return self.all_active_power_electricity_feilv3A1

    # 费率3 B 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showB(self):
        return self.all_watch_power_electricity_feilv3B

    # 费率3 B 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showB1(self):
        return self.all_watch_power_electricity_feilv3B1
    # 费率3 B 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showB(self):
        return self.all_active_power_electricity_feilv3B

    # 费率3 B 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showB1(self):
        return self.all_active_power_electricity_feilv3B1

    # 费率3 C 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showC(self):
        return self.all_watch_power_electricity_feilv3C

    # 费率3 C 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showC1(self):
        return self.all_watch_power_electricity_feilv3C1
    # 费率3 C 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showC(self):
        return self.all_active_power_electricity_feilv3C

    # 费率3 C 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showC1(self):
        return self.all_active_power_electricity_feilv3C1

    # 费率3 ALL 正向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showALL(self):
        return self.all_watch_power_electricity_feilv3A+self.all_watch_power_electricity_feilv3B+self.all_watch_power_electricity_feilv3C
    # 费率3 ALL 反向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv3_showALL1(self):
        return self.all_watch_power_electricity_feilv3A1+self.all_watch_power_electricity_feilv3B1+self.all_watch_power_electricity_feilv3C1

    # 费率3 ALL 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showALL(self):
        return self.all_active_power_electricity_feilv3A + self.all_active_power_electricity_feilv3B + self.all_active_power_electricity_feilv3C

    # 费率3 ALL 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showALL1(self):
        return self.all_active_power_electricity_feilv3A1 + self.all_active_power_electricity_feilv3B1 + self.all_active_power_electricity_feilv3C1

    # 费率3 组合全部有功电量
    #
    def dianbiao_active_power_electricity_feilv3_showSTRUCT(self):
        tmp = self.all_active_power_electricity_feilv3A + self.all_active_power_electricity_feilv3B + self.all_active_power_electricity_feilv3C
        tmp -= (
                    self.all_active_power_electricity_feilv3A1 + self.all_active_power_electricity_feilv3B1 + self.all_active_power_electricity_feilv3C1)
        return tmp
    # 费率4 A 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showA(self):
        return self.all_watch_power_electricity_feilv4A

    # 费率4 A 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showA1(self):
        return self.all_watch_power_electricity_feilv4A1
    # 费率4 A 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showA(self):
        return self.all_active_power_electricity_feilv4A

    # 费率4 A 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showA1(self):
        return self.all_active_power_electricity_feilv4A1

    # 费率4 B 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showB(self):
        return self.all_watch_power_electricity_feilv4B

    # 费率4 B 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showB1(self):
        return self.all_watch_power_electricity_feilv4B1

    # 费率4 B 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showB(self):
        return self.all_active_power_electricity_feilv4B

    # 费率4 B 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showB1(self):
        return self.all_active_power_electricity_feilv4B1

    # 费率4 C 正向视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showC(self):
        return self.all_watch_power_electricity_feilv4C

    # 费率4 C 反向视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showC1(self):
        return self.all_watch_power_electricity_feilv4C1

    # 费率4 C 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showC(self):
        return self.all_active_power_electricity_feilv4C

    # 费率4 C 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showC1(self):
        return self.all_active_power_electricity_feilv4C1

    # 费率4 ALL 正向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showALL(self):
        return self.all_watch_power_electricity_feilv4A+self.all_watch_power_electricity_feilv4B+self.all_watch_power_electricity_feilv4C

    # 费率4 ALL 反向全部视在电量
    #
    def dianbiao_watch_power_electricity_feilv4_showALL1(self):
        return self.all_watch_power_electricity_feilv4A1+self.all_watch_power_electricity_feilv4B1+self.all_watch_power_electricity_feilv4C1

    # 费率4 ALL 正向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showALL(self):
        return self.all_active_power_electricity_feilv4A + self.all_active_power_electricity_feilv4B + self.all_active_power_electricity_feilv4C

    # 费率4 ALL 反向全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showALL1(self):
        return self.all_active_power_electricity_feilv4A1 + self.all_active_power_electricity_feilv4B1 + self.all_active_power_electricity_feilv4C1

    # 费率4 组合全部有功电量
    #
    def dianbiao_active_power_electricity_feilv4_showSTRUCT(self):
        tmp=self.all_active_power_electricity_feilv4A+self.all_active_power_electricity_feilv4B+self.all_active_power_electricity_feilv4C
        tmp-=(self.all_active_power_electricity_feilv4A1 + self.all_active_power_electricity_feilv4B1 + self.all_active_power_electricity_feilv4C1)
        return tmp
    ################################################################################
    # 象限1 A 无功电量
    #
    def dianbiao_quadrant1_all_reactive_power_electricity_showA(self):
        return self.all_quadrant1_reactive_power_electricityA
    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showA(self):
        return self.all_quadrant1_reactive_power_electricity_feilv1A
    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showA(self):
        return self.all_quadrant1_reactive_power_electricity_feilv2A
    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showA(self):
        return self.all_quadrant1_reactive_power_electricity_feilv3A
    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showA(self):
        return self.all_quadrant1_reactive_power_electricity_feilv4A

    # 象限2 A 无功电量
    #
    def dianbiao_quadrant2_all_reactive_power_electricity_showA(self):
        return self.all_quadrant2_reactive_power_electricityA

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showA(self):
        return self.all_quadrant2_reactive_power_electricity_feilv1A

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showA(self):
        return self.all_quadrant2_reactive_power_electricity_feilv2A

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showA(self):
        return self.all_quadrant2_reactive_power_electricity_feilv3A

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showA(self):
        return self.all_quadrant2_reactive_power_electricity_feilv4A

    # 象限3 A 无功电量
    #
    def dianbiao_quadrant3_all_reactive_power_electricity_showA(self):
        return self.all_quadrant3_reactive_power_electricityA

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showA(self):
        return self.all_quadrant3_reactive_power_electricity_feilv1A

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showA(self):
        return self.all_quadrant3_reactive_power_electricity_feilv2A

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showA(self):
        return self.all_quadrant3_reactive_power_electricity_feilv3A

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showA(self):
        return self.all_quadrant3_reactive_power_electricity_feilv4A

    # 象限4 A 无功电量
    #
    def dianbiao_quadrant4_all_reactive_power_electricity_showA(self):
        return self.all_quadrant4_reactive_power_electricityA

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showA(self):
        return self.all_quadrant4_reactive_power_electricity_feilv1A

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showA(self):
        return self.all_quadrant4_reactive_power_electricity_feilv2A

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showA(self):
        return self.all_quadrant4_reactive_power_electricity_feilv3A

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showA(self):
        return self.all_quadrant4_reactive_power_electricity_feilv4A

    # 象限1 B 无功电量
    #
    def dianbiao_quadrant1_all_reactive_power_electricity_showB(self):
        return self.all_quadrant1_reactive_power_electricityB

    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showB(self):
        return self.all_quadrant1_reactive_power_electricity_feilv1B

    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showB(self):
        return self.all_quadrant1_reactive_power_electricity_feilv2B

    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showB(self):
        return self.all_quadrant1_reactive_power_electricity_feilv3B

    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showB(self):
        return self.all_quadrant1_reactive_power_electricity_feilv4B

    # 象限2 B 无功电量
    #
    def dianbiao_quadrant2_all_reactive_power_electricity_showB(self):
        return self.all_quadrant2_reactive_power_electricityB

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showB(self):
        return self.all_quadrant2_reactive_power_electricity_feilv1B

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showB(self):
        return self.all_quadrant2_reactive_power_electricity_feilv2B

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showB(self):
        return self.all_quadrant2_reactive_power_electricity_feilv3B

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showB(self):
        return self.all_quadrant2_reactive_power_electricity_feilv4B

    # 象限3 B 无功电量
    #
    def dianbiao_quadrant3_all_reactive_power_electricity_showB(self):
        return self.all_quadrant3_reactive_power_electricityB

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showB(self):
        return self.all_quadrant3_reactive_power_electricity_feilv1B

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showB(self):
        return self.all_quadrant3_reactive_power_electricity_feilv2B

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showB(self):
        return self.all_quadrant3_reactive_power_electricity_feilv3B

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showB(self):
        return self.all_quadrant3_reactive_power_electricity_feilv4B

    # 象限4 B 无功电量
    #
    def dianbiao_quadrant4_all_reactive_power_electricity_showB(self):
        return self.all_quadrant4_reactive_power_electricityB

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showB(self):
        return self.all_quadrant4_reactive_power_electricity_feilv1B

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showB(self):
        return self.all_quadrant4_reactive_power_electricity_feilv2B

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showB(self):
        return self.all_quadrant4_reactive_power_electricity_feilv3B

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showB(self):
        return self.all_quadrant4_reactive_power_electricity_feilv4B

    # 象限1 C 无功电量
    #
    def dianbiao_quadrant1_all_reactive_power_electricity_showC(self):
        return self.all_quadrant1_reactive_power_electricityC

    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showC(self):
        return self.all_quadrant1_reactive_power_electricity_feilv1C

    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showC(self):
        return self.all_quadrant1_reactive_power_electricity_feilv2C

    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showC(self):
        return self.all_quadrant1_reactive_power_electricity_feilv3C

    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showC(self):
        return self.all_quadrant1_reactive_power_electricity_feilv4C

    # 象限2 C 无功电量
    #
    def dianbiao_quadrant2_all_reactive_power_electricity_showC(self):
        return self.all_quadrant2_reactive_power_electricityC

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showC(self):
        return self.all_quadrant2_reactive_power_electricity_feilv1C

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showC(self):
        return self.all_quadrant2_reactive_power_electricity_feilv2C

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showC(self):
        return self.all_quadrant2_reactive_power_electricity_feilv3C

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showC(self):
        return self.all_quadrant2_reactive_power_electricity_feilv4C

    # 象限3 C 无功电量
    #
    def dianbiao_quadrant3_all_reactive_power_electricity_showC(self):
        return self.all_quadrant3_reactive_power_electricityC

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showC(self):
        return self.all_quadrant3_reactive_power_electricity_feilv1C

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showC(self):
        return self.all_quadrant3_reactive_power_electricity_feilv2C

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showC(self):
        return self.all_quadrant3_reactive_power_electricity_feilv3C

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showC(self):
        return self.all_quadrant3_reactive_power_electricity_feilv4C

    # 象限4 C 无功电量
    #
    def dianbiao_quadrant4_all_reactive_power_electricity_showC(self):
        return self.all_quadrant4_reactive_power_electricityC

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showC(self):
        return self.all_quadrant4_reactive_power_electricity_feilv1C

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showC(self):
        return self.all_quadrant4_reactive_power_electricity_feilv2C

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showC(self):
        return self.all_quadrant4_reactive_power_electricity_feilv3C

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showC(self):
        return self.all_quadrant4_reactive_power_electricity_feilv4C
    #################################################################################################
    def dianbiao_quadrant1_all_reactive_power_electricity_showALL(self):
        return self.all_quadrant1_reactive_power_electricityA+self.all_quadrant1_reactive_power_electricityB+self.all_quadrant1_reactive_power_electricityC
    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showALL(self):
        return self.all_quadrant1_reactive_power_electricity_feilv1A + self.all_quadrant1_reactive_power_electricity_feilv1B + self.all_quadrant1_reactive_power_electricity_feilv1C
    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showALL(self):
        return self.all_quadrant1_reactive_power_electricity_feilv2A + self.all_quadrant1_reactive_power_electricity_feilv2B + self.all_quadrant1_reactive_power_electricity_feilv2C
    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showALL(self):
        return self.all_quadrant1_reactive_power_electricity_feilv3A + self.all_quadrant1_reactive_power_electricity_feilv3B + self.all_quadrant1_reactive_power_electricity_feilv3C
    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showALL(self):
        return self.all_quadrant1_reactive_power_electricity_feilv4A + self.all_quadrant1_reactive_power_electricity_feilv4B + self.all_quadrant1_reactive_power_electricity_feilv4C

    #################################################################################################
    def dianbiao_quadrant2_all_reactive_power_electricity_showALL(self):
        return self.all_quadrant2_reactive_power_electricityA + self.all_quadrant2_reactive_power_electricityB + self.all_quadrant2_reactive_power_electricityC

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showALL(self):
        return self.all_quadrant2_reactive_power_electricity_feilv1A + self.all_quadrant2_reactive_power_electricity_feilv1B + self.all_quadrant2_reactive_power_electricity_feilv1C

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showALL(self):
        return self.all_quadrant2_reactive_power_electricity_feilv2A + self.all_quadrant2_reactive_power_electricity_feilv2B + self.all_quadrant2_reactive_power_electricity_feilv2C

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showALL(self):
        return self.all_quadrant2_reactive_power_electricity_feilv3A + self.all_quadrant2_reactive_power_electricity_feilv3B + self.all_quadrant2_reactive_power_electricity_feilv3C

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showALL(self):
        return self.all_quadrant2_reactive_power_electricity_feilv4A + self.all_quadrant2_reactive_power_electricity_feilv4B + self.all_quadrant2_reactive_power_electricity_feilv4C

    #################################################################################################
    def dianbiao_quadrant3_all_reactive_power_electricity_showALL(self):
        return self.all_quadrant3_reactive_power_electricityA + self.all_quadrant3_reactive_power_electricityB + self.all_quadrant3_reactive_power_electricityC

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showALL(self):
        return self.all_quadrant3_reactive_power_electricity_feilv1A + self.all_quadrant3_reactive_power_electricity_feilv1B + self.all_quadrant3_reactive_power_electricity_feilv1C

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showALL(self):
        return self.all_quadrant3_reactive_power_electricity_feilv2A + self.all_quadrant3_reactive_power_electricity_feilv2B + self.all_quadrant3_reactive_power_electricity_feilv2C

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showALL(self):
        return self.all_quadrant3_reactive_power_electricity_feilv3A + self.all_quadrant3_reactive_power_electricity_feilv3B + self.all_quadrant3_reactive_power_electricity_feilv3C

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showALL(self):
        return self.all_quadrant3_reactive_power_electricity_feilv4A + self.all_quadrant3_reactive_power_electricity_feilv4B + self.all_quadrant3_reactive_power_electricity_feilv4C

    #################################################################################################
    def dianbiao_quadrant4_all_reactive_power_electricity_showALL(self):
        return self.all_quadrant4_reactive_power_electricityA + self.all_quadrant4_reactive_power_electricityB + self.all_quadrant4_reactive_power_electricityC

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showALL(self):
        return self.all_quadrant4_reactive_power_electricity_feilv1A + self.all_quadrant4_reactive_power_electricity_feilv1B + self.all_quadrant4_reactive_power_electricity_feilv1C

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showALL(self):
        return self.all_quadrant4_reactive_power_electricity_feilv2A + self.all_quadrant4_reactive_power_electricity_feilv2B + self.all_quadrant4_reactive_power_electricity_feilv2C

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showALL(self):
        return self.all_quadrant4_reactive_power_electricity_feilv3A + self.all_quadrant4_reactive_power_electricity_feilv3B + self.all_quadrant4_reactive_power_electricity_feilv3C

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showALL(self):
        return self.all_quadrant4_reactive_power_electricity_feilv4A + self.all_quadrant4_reactive_power_electricity_feilv4B + self.all_quadrant4_reactive_power_electricity_feilv4C
    ##########################################################################
    def dianbiao_quadrant_reactive_power_electricity_showASTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityA
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityA
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityA
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityA
        tmp=all_quadrant1+all_quadrant2#-all_quadrant3-all_quadrant4
        return tmp
    def dianbiao_quadrant_reactive_power_electricity_showBSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityB
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityB
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityB
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityB
        tmp=all_quadrant1+all_quadrant2#-all_quadrant3-all_quadrant4
        return tmp
    def dianbiao_quadrant_reactive_power_electricity_showCSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityC
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityC
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityC
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityC
        tmp=all_quadrant1+all_quadrant2#-all_quadrant3-all_quadrant4
        return tmp
    def dianbiao_quadrant_reactive_power_electricity_showSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityA + self.all_quadrant1_reactive_power_electricityB + self.all_quadrant1_reactive_power_electricityC
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityA + self.all_quadrant2_reactive_power_electricityB + self.all_quadrant2_reactive_power_electricityC
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityA + self.all_quadrant3_reactive_power_electricityB + self.all_quadrant3_reactive_power_electricityC
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityA + self.all_quadrant4_reactive_power_electricityB + self.all_quadrant4_reactive_power_electricityC
        tmp=all_quadrant1+all_quadrant2#-all_quadrant3-all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv1_reactive_power_electricity_showSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv1A + self.all_quadrant1_reactive_power_electricity_feilv1B + self.all_quadrant1_reactive_power_electricity_feilv1C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv1A + self.all_quadrant2_reactive_power_electricity_feilv1B + self.all_quadrant2_reactive_power_electricity_feilv1C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv1A + self.all_quadrant3_reactive_power_electricity_feilv1B + self.all_quadrant3_reactive_power_electricity_feilv1C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv1A + self.all_quadrant4_reactive_power_electricity_feilv1B + self.all_quadrant4_reactive_power_electricity_feilv1C
        tmp = all_quadrant1 + all_quadrant2# - all_quadrant3 - all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv2_reactive_power_electricity_showSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv2A + self.all_quadrant1_reactive_power_electricity_feilv2B + self.all_quadrant1_reactive_power_electricity_feilv2C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv2A + self.all_quadrant2_reactive_power_electricity_feilv2B + self.all_quadrant2_reactive_power_electricity_feilv2C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv2A + self.all_quadrant3_reactive_power_electricity_feilv2B + self.all_quadrant3_reactive_power_electricity_feilv2C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv2A + self.all_quadrant4_reactive_power_electricity_feilv2B + self.all_quadrant4_reactive_power_electricity_feilv2C
        tmp = all_quadrant1 + all_quadrant2# - all_quadrant3 - all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv3_reactive_power_electricity_showSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv3A + self.all_quadrant1_reactive_power_electricity_feilv3B + self.all_quadrant1_reactive_power_electricity_feilv3C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv3A + self.all_quadrant2_reactive_power_electricity_feilv3B + self.all_quadrant2_reactive_power_electricity_feilv3C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv3A + self.all_quadrant3_reactive_power_electricity_feilv3B + self.all_quadrant3_reactive_power_electricity_feilv3C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv3A + self.all_quadrant4_reactive_power_electricity_feilv3B + self.all_quadrant4_reactive_power_electricity_feilv3C
        tmp = all_quadrant1 + all_quadrant2# - all_quadrant3 - all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv4_reactive_power_electricity_showSTRUCT1(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv4A + self.all_quadrant1_reactive_power_electricity_feilv4B + self.all_quadrant1_reactive_power_electricity_feilv4C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv4A + self.all_quadrant2_reactive_power_electricity_feilv4B + self.all_quadrant2_reactive_power_electricity_feilv4C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv4A + self.all_quadrant3_reactive_power_electricity_feilv4B + self.all_quadrant3_reactive_power_electricity_feilv4C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv4A + self.all_quadrant4_reactive_power_electricity_feilv4B + self.all_quadrant4_reactive_power_electricity_feilv4C
        tmp = all_quadrant1 + all_quadrant2# - all_quadrant3 - all_quadrant4
        return tmp
#############################################################################################################################
    def dianbiao_quadrant_reactive_power_electricity_showASTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityA
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityA
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityA
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityA
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_reactive_power_electricity_showBSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityB
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityB
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityB
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityB
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_reactive_power_electricity_showCSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityC
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityC
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityC
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityC
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_reactive_power_electricity_showSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricityA + self.all_quadrant1_reactive_power_electricityB + self.all_quadrant1_reactive_power_electricityC
        all_quadrant2 = self.all_quadrant2_reactive_power_electricityA + self.all_quadrant2_reactive_power_electricityB + self.all_quadrant2_reactive_power_electricityC
        all_quadrant3 = self.all_quadrant3_reactive_power_electricityA + self.all_quadrant3_reactive_power_electricityB + self.all_quadrant3_reactive_power_electricityC
        all_quadrant4 = self.all_quadrant4_reactive_power_electricityA + self.all_quadrant4_reactive_power_electricityB + self.all_quadrant4_reactive_power_electricityC
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv1_reactive_power_electricity_showSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv1A + self.all_quadrant1_reactive_power_electricity_feilv1B + self.all_quadrant1_reactive_power_electricity_feilv1C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv1A + self.all_quadrant2_reactive_power_electricity_feilv1B + self.all_quadrant2_reactive_power_electricity_feilv1C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv1A + self.all_quadrant3_reactive_power_electricity_feilv1B + self.all_quadrant3_reactive_power_electricity_feilv1C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv1A + self.all_quadrant4_reactive_power_electricity_feilv1B + self.all_quadrant4_reactive_power_electricity_feilv1C
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv2_reactive_power_electricity_showSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv2A + self.all_quadrant1_reactive_power_electricity_feilv2B + self.all_quadrant1_reactive_power_electricity_feilv2C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv2A + self.all_quadrant2_reactive_power_electricity_feilv2B + self.all_quadrant2_reactive_power_electricity_feilv2C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv2A + self.all_quadrant3_reactive_power_electricity_feilv2B + self.all_quadrant3_reactive_power_electricity_feilv2C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv2A + self.all_quadrant4_reactive_power_electricity_feilv2B + self.all_quadrant4_reactive_power_electricity_feilv2C
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv3_reactive_power_electricity_showSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv3A + self.all_quadrant1_reactive_power_electricity_feilv3B + self.all_quadrant1_reactive_power_electricity_feilv3C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv3A + self.all_quadrant2_reactive_power_electricity_feilv3B + self.all_quadrant2_reactive_power_electricity_feilv3C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv3A + self.all_quadrant3_reactive_power_electricity_feilv3B + self.all_quadrant3_reactive_power_electricity_feilv3C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv3A + self.all_quadrant4_reactive_power_electricity_feilv3B + self.all_quadrant4_reactive_power_electricity_feilv3C
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    def dianbiao_quadrant_feilv4_reactive_power_electricity_showSTRUCT2(self):
        all_quadrant1 = self.all_quadrant1_reactive_power_electricity_feilv4A + self.all_quadrant1_reactive_power_electricity_feilv4B + self.all_quadrant1_reactive_power_electricity_feilv4C
        all_quadrant2 = self.all_quadrant2_reactive_power_electricity_feilv4A + self.all_quadrant2_reactive_power_electricity_feilv4B + self.all_quadrant2_reactive_power_electricity_feilv4C
        all_quadrant3 = self.all_quadrant3_reactive_power_electricity_feilv4A + self.all_quadrant3_reactive_power_electricity_feilv4B + self.all_quadrant3_reactive_power_electricity_feilv4C
        all_quadrant4 = self.all_quadrant4_reactive_power_electricity_feilv4A + self.all_quadrant4_reactive_power_electricity_feilv4B + self.all_quadrant4_reactive_power_electricity_feilv4C
        tmp=all_quadrant3 + all_quadrant4
        return tmp
    ##########################################################################
    def dianbiao_last_data_db_find(self,last_data):
        time_tmp = time.localtime(time.time())
        last_data_tmp=last_data
        leap_year_list_tmp=[31,29,31,30,31,30,31,31,30,31,30,31]
        ordinary_year_list_tmp = [31,28,31,30,31,30,31,31,30,31,30,31]

        time_tmp_year = time_tmp.tm_year-4*(last_data_tmp//(365*4+1))#去掉4年的周期

        data_tmp = last_data_tmp % (365*4+1) #4年还有的天数

        if(data_tmp==0):#4*n 年前的今天。数据在第二天 00:00
            if (calendar.isleap(time_tmp_year)):
                mon_list_tmp = leap_year_list_tmp
            else:
                mon_list_tmp = ordinary_year_list_tmp

            if(mon_list_tmp[time_tmp.tm_mon-1]>time_tmp.tm_mday):
                time_tmp_mon=time_tmp.tm_mon
                time_tmp_day=time_tmp.tm_mday+1
            else:
                if(time_tmp.tm_mon==12):
                    time_tmp_year+=1
                    time_tmp_mon=1
                    time_tmp_day=1
                else:
                    time_tmp_mon = time_tmp.tm_mon+1
                    time_tmp_day = 1
        else:

            while 1:
                if (calendar.isleap(time_tmp_year)):
                    if(data_tmp>366):
                        data_tmp-=366
                        time_tmp_year-=1
                    else:
                        break
                else:
                    if (data_tmp > 365):
                        data_tmp -= 365
                        time_tmp_year -= 1
                    else:
                        break


            time_tmp_mon=time_tmp.tm_mon
            time_tmp_day=time_tmp.tm_mday

            while 1:
                if(data_tmp>(time_tmp_day-1)):
                    data_tmp-=(time_tmp_day)
                    if(time_tmp_mon==1):
                        time_tmp_mon=12
                        time_tmp_year-=1
                        time_tmp_day=31
                    else:
                        if (calendar.isleap(time_tmp_year)):
                            mon_list_tmp = leap_year_list_tmp
                        else:
                            mon_list_tmp = ordinary_year_list_tmp

                        time_tmp_mon -=1
                        time_tmp_day=mon_list_tmp[time_tmp_mon-1]
                else:
                    break

            time_tmp_day=time_tmp_day-data_tmp

            if (calendar.isleap(time_tmp_year)):
                mon_list_tmp = leap_year_list_tmp
            else:
                mon_list_tmp = ordinary_year_list_tmp

            if(mon_list_tmp[time_tmp_mon-1]>time_tmp_day):
                time_tmp_day +=1
            else:
                if(time_tmp_mon==12):
                    time_tmp_year+=1
                    time_tmp_mon=1
                    time_tmp_day=1
                else:
                    time_tmp_mon +=1
                    time_tmp_day = 1


        return "{:0>4d}".format(time_tmp_year) + "{:0>2d}".format(time_tmp_mon) +  "{:0>2d}".format(time_tmp_day) + "0000.json"


    def dianbiao_all_active_power_electricity_db_showALL(self,last_data):
        time_tmp_str = self.dianbiao_last_data_db_find(last_data)
        if os.path.exists(self.address):
            data_dict = {}
            if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
                dir_pwd_tmp = self.address + "\\cold\\day\\" + time_tmp_str
            else:
                dir_pwd_tmp = self.address + "/cold/day/" + time_tmp_str
            if os.path.exists(dir_pwd_tmp):
                try:
                    with open(dir_pwd_tmp, "r") as f:
                        data_dict = eval(f.read())
                        f.close()
                        return float(data_dict["all_active_power_electricityALL"])
                except:
                    pass
        return 0.0
    def dianbiao_all_active_power_electricity_db_showALL1(self,last_data):
        time_tmp_str = self.dianbiao_last_data_db_find(last_data)
        if os.path.exists(self.address):
            data_dict = {}
            if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
                dir_pwd_tmp = self.address + "\\cold\\day\\" + time_tmp_str
            else:
                dir_pwd_tmp = self.address + "/cold/day/" + time_tmp_str
            if os.path.exists(dir_pwd_tmp):
                try:
                    with open(dir_pwd_tmp, "r") as f:
                        data_dict = eval(f.read())
                        f.close()
                        return float(data_dict["all_active_power_electricityALL1"])
                except:
                    pass
        return 0.0

    def dianbiao_all_reactive_power_electricity_dbq1_showALL(self,last_data):
        time_tmp_str = self.dianbiao_last_data_db_find(last_data)
        if os.path.exists(self.address):
            data_dict = {}
            if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
                dir_pwd_tmp = self.address + "\\cold\\day\\" + time_tmp_str
            else:
                dir_pwd_tmp = self.address + "/cold/day/" + time_tmp_str
            if os.path.exists(dir_pwd_tmp):
                try:
                    with open(dir_pwd_tmp, "r") as f:
                        data_dict = eval(f.read())
                        f.close()
                        return float(data_dict["all_reactive_power_electricityALL_quadrant1"])
                except:
                    pass
        return 0.0
    def dianbiao_all_reactive_power_electricity_dbq2_showALL(self,last_data):
        time_tmp_str = self.dianbiao_last_data_db_find(last_data)
        if os.path.exists(self.address):
            data_dict = {}
            if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
                dir_pwd_tmp = self.address + "\\cold\\day\\" + time_tmp_str
            else:
                dir_pwd_tmp = self.address + "/cold/day/" + time_tmp_str
            if os.path.exists(dir_pwd_tmp):
                try:
                    with open(dir_pwd_tmp, "r") as f:
                        data_dict = eval(f.read())
                        f.close()
                        return float(data_dict["all_reactive_power_electricityALL_quadrant2"])
                except:
                    pass
        return 0.0
    def dianbiao_all_reactive_power_electricity_dbq3_showALL(self,last_data):
        time_tmp_str = self.dianbiao_last_data_db_find(last_data)
        if os.path.exists(self.address):
            data_dict = {}
            if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
                dir_pwd_tmp = self.address + "\\cold\\day\\" + time_tmp_str
            else:
                dir_pwd_tmp = self.address + "/cold/day/" + time_tmp_str
            if os.path.exists(dir_pwd_tmp):
                try:
                    with open(dir_pwd_tmp, "r") as f:
                        data_dict = eval(f.read())
                        f.close()
                        return float(data_dict["all_reactive_power_electricityALL_quadrant3"])
                except:
                    pass
        return 0.0
    def dianbiao_all_reactive_power_electricity_dbq4_showALL(self,last_data):
        time_tmp_str = self.dianbiao_last_data_db_find(last_data)
        if os.path.exists(self.address):
            data_dict = {}
            if ((platform.system()[0] == "W") or (platform.system()[0] == "w")):
                dir_pwd_tmp = self.address + "\\cold\\day\\" + time_tmp_str
            else:
                dir_pwd_tmp = self.address + "/cold/day/" + time_tmp_str
            if os.path.exists(dir_pwd_tmp):
                try:
                    with open(dir_pwd_tmp, "r") as f:
                        data_dict = eval(f.read())
                        f.close()
                        return float(data_dict["all_reactive_power_electricityALL_quadrant4"])
                except:
                    pass
        return 0.0
    ##################################show need########################################
    ##############################A########################################
    def dianbiao_all_watch_power_electricity_needA_show(self):
        return self.all_watch_power_electricity_needA

    def dianbiao_all_watch_power_electricity_needtimeA_show(self):
        return self.all_watch_power_electricity_needtimeA

    def dianbiao_all_watch_power_electricity_needA1_show(self):
        return self.all_watch_power_electricity_needA1

    def dianbiao_all_watch_power_electricity_needtimeA1_show(self):
        return self.all_watch_power_electricity_needtimeA1

    def dianbiao_all_active_power_electricity_needA_show(self):
        return self.all_watch_power_electricity_needA

    def dianbiao_all_active_power_electricity_needtimeA_show(self):
        return self.all_watch_power_electricity_needtimeA

    def dianbiao_all_active_power_electricity_needA1_show(self):
        return self.all_watch_power_electricity_needA1

    def dianbiao_all_active_power_electricity_needtimeA1_show(self):
        return self.all_watch_power_electricity_needtimeA1

    def dianbiao_all_quadrant1_reactive_power_electricity_needA_show(self):
        return self.all_quadrant1_reactive_power_electricity_needA

    def dianbiao_all_quadrant1_reactive_power_electricity_needtimeA_show(self):
        return self.all_quadrant1_reactive_power_electricity_needtimeA

    def dianbiao_all_quadrant2_reactive_power_electricity_needA_show(self):
        return self.all_quadrant2_reactive_power_electricity_needA

    def dianbiao_all_quadrant2_reactive_power_electricity_needtimeA_show(self):
        return self.all_quadrant2_reactive_power_electricity_needtimeA

    def dianbiao_all_quadrant3_reactive_power_electricity_needA_show(self):
        return self.all_quadrant3_reactive_power_electricity_needA

    def dianbiao_all_quadrant3_reactive_power_electricity_needtimeA_show(self):
        return self.all_quadrant3_reactive_power_electricity_needtimeA

    def dianbiao_all_quadrant4_reactive_power_electricity_needA_show(self):
        return self.all_quadrant4_reactive_power_electricity_needA

    def dianbiao_all_quadrant4_reactive_power_electricity_needtimeA_show(self):
        return self.all_quadrant4_reactive_power_electricity_needtimeA

    def dianbiao_all_quadrant_reactive_power_electricity_needstruct1A_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct1A

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct1A_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct1A

    def dianbiao_all_quadrant_reactive_power_electricity_needstruct2A_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct2A

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct2A_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct2A
    ##############################B########################################
    def dianbiao_all_watch_power_electricity_needB_show(self):
        return self.all_watch_power_electricity_needB

    def dianbiao_all_watch_power_electricity_needtimeB_show(self):
        return self.all_watch_power_electricity_needtimeB

    def dianbiao_all_watch_power_electricity_needB1_show(self):
        return self.all_watch_power_electricity_needB1

    def dianbiao_all_watch_power_electricity_needtimeB1_show(self):
        return self.all_watch_power_electricity_needtimeB1

    def dianbiao_all_active_power_electricity_needB_show(self):
        return self.all_watch_power_electricity_needB

    def dianbiao_all_active_power_electricity_needtimeB_show(self):
        return self.all_watch_power_electricity_needtimeB

    def dianbiao_all_active_power_electricity_needB1_show(self):
        return self.all_watch_power_electricity_needB1

    def dianbiao_all_active_power_electricity_needtimeB1_show(self):
        return self.all_watch_power_electricity_needtimeB1

    def dianbiao_all_quadrant1_reactive_power_electricity_needB_show(self):
        return self.all_quadrant1_reactive_power_electricity_needB

    def dianbiao_all_quadrant1_reactive_power_electricity_needtimeB_show(self):
        return self.all_quadrant1_reactive_power_electricity_needtimeB

    def dianbiao_all_quadrant2_reactive_power_electricity_needB_show(self):
        return self.all_quadrant2_reactive_power_electricity_needB

    def dianbiao_all_quadrant2_reactive_power_electricity_needtimeB_show(self):
        return self.all_quadrant2_reactive_power_electricity_needtimeB

    def dianbiao_all_quadrant3_reactive_power_electricity_needB_show(self):
        return self.all_quadrant3_reactive_power_electricity_needB

    def dianbiao_all_quadrant3_reactive_power_electricity_needtimeB_show(self):
        return self.all_quadrant3_reactive_power_electricity_needtimeB

    def dianbiao_all_quadrant4_reactive_power_electricity_needB_show(self):
        return self.all_quadrant4_reactive_power_electricity_needB

    def dianbiao_all_quadrant4_reactive_power_electricity_needtimeB_show(self):
        return self.all_quadrant4_reactive_power_electricity_needtimeB

    def dianbiao_all_quadrant_reactive_power_electricity_needstruct1B_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct1B

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct1B_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct1B

    def dianbiao_all_quadrant_reactive_power_electricity_needstruct2B_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct2B

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct2B_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct2B
    ##########################################c######################################
    def dianbiao_all_watch_power_electricity_needC_show(self):
        return self.all_watch_power_electricity_needC

    def dianbiao_all_watch_power_electricity_needtimeC_show(self):
        return self.all_watch_power_electricity_needtimeC

    def dianbiao_all_watch_power_electricity_needC1_show(self):
        return self.all_watch_power_electricity_needC1

    def dianbiao_all_watch_power_electricity_needtimeC1_show(self):
        return self.all_watch_power_electricity_needtimeC1

    def dianbiao_all_active_power_electricity_needC_show(self):
        return self.all_watch_power_electricity_needC

    def dianbiao_all_active_power_electricity_needtimeC_show(self):
        return self.all_watch_power_electricity_needtimeC

    def dianbiao_all_active_power_electricity_needC1_show(self):
        return self.all_watch_power_electricity_needC1

    def dianbiao_all_active_power_electricity_needtimeC1_show(self):
        return self.all_watch_power_electricity_needtimeC1

    def dianbiao_all_quadrant1_reactive_power_electricity_needC_show(self):
        return self.all_quadrant1_reactive_power_electricity_needC

    def dianbiao_all_quadrant1_reactive_power_electricity_needtimeC_show(self):
        return self.all_quadrant1_reactive_power_electricity_needtimeC

    def dianbiao_all_quadrant2_reactive_power_electricity_needC_show(self):
        return self.all_quadrant2_reactive_power_electricity_needC

    def dianbiao_all_quadrant2_reactive_power_electricity_needtimeC_show(self):
        return self.all_quadrant2_reactive_power_electricity_needtimeC

    def dianbiao_all_quadrant3_reactive_power_electricity_needC_show(self):
        return self.all_quadrant3_reactive_power_electricity_needC

    def dianbiao_all_quadrant3_reactive_power_electricity_needtimeC_show(self):
        return self.all_quadrant3_reactive_power_electricity_needtimeC

    def dianbiao_all_quadrant4_reactive_power_electricity_needC_show(self):
        return self.all_quadrant4_reactive_power_electricity_needC

    def dianbiao_all_quadrant4_reactive_power_electricity_needtimeC_show(self):
        return self.all_quadrant4_reactive_power_electricity_needtimeC

    def dianbiao_all_quadrant_reactive_power_electricity_needstruct1C_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct1C

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct1C_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct1C

    def dianbiao_all_quadrant_reactive_power_electricity_needstruct2C_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct2C

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct2C_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct2C

    ####################################all#############################################
    def dianbiao_all_watch_power_electricity_needALL_show(self):
        return self.all_watch_power_electricity_needALL

    def dianbiao_all_watch_power_electricity_needtimeALL_show(self):
        return self.all_watch_power_electricity_needtimeALL

    def dianbiao_all_watch_power_electricity_feilv1_needALL_show(self):
        return self.all_watch_power_electricity_feilv1_needALL

    def dianbiao_all_watch_power_electricity_feilv1_needtimeALL_show(self):
        return self.all_watch_power_electricity_feilv1_needtimeALL

    def dianbiao_all_watch_power_electricity_feilv2_needALL_show(self):
        return self.all_watch_power_electricity_feilv2_needALL

    def dianbiao_all_watch_power_electricity_feilv2_needtimeALL_show(self):
        return self.all_watch_power_electricity_feilv2_needtimeALL

    def dianbiao_all_watch_power_electricity_feilv3_needALL_show(self):
        return self.all_watch_power_electricity_feilv3_needALL

    def dianbiao_all_watch_power_electricity_feilv3_needtimeALL_show(self):
        return self.all_watch_power_electricity_feilv3_needtimeALL

    def dianbiao_all_watch_power_electricity_feilv4_needALL_show(self):
        return self.all_watch_power_electricity_feilv4_needALL

    def dianbiao_all_watch_power_electricity_feilv4_needtimeALL_show(self):
        return self.all_watch_power_electricity_feilv4_needtimeALL

    def dianbiao_all_watch_power_electricity_needALL1_show(self):
        return self.all_watch_power_electricity_needALL1

    def dianbiao_all_watch_power_electricity_needtimeALL1_show(self):
        return self.all_watch_power_electricity_needtimeALL1

    def dianbiao_all_watch_power_electricity_feilv1_needALL1_show(self):
        return self.all_watch_power_electricity_feilv1_needALL1

    def dianbiao_all_watch_power_electricity_feilv1_needtimeALL1_show(self):
        return self.all_watch_power_electricity_feilv1_needtimeALL1

    def dianbiao_all_watch_power_electricity_feilv2_needALL1_show(self):
        return self.all_watch_power_electricity_feilv2_needALL1

    def dianbiao_all_watch_power_electricity_feilv2_needtimeALL1_show(self):
        return self.all_watch_power_electricity_feilv2_needtimeALL1

    def dianbiao_all_watch_power_electricity_feilv3_needALL1_show(self):
        return self.all_watch_power_electricity_feilv3_needALL1

    def dianbiao_all_watch_power_electricity_feilv3_needtimeALL1_show(self):
        return self.all_watch_power_electricity_feilv3_needtimeALL1

    def dianbiao_all_watch_power_electricity_feilv4_needALL1_show(self):
        return self.all_watch_power_electricity_feilv4_needALL1

    def dianbiao_all_watch_power_electricity_feilv4_needtimeALL1_show(self):
        return self.all_watch_power_electricity_feilv4_needtimeALL1
    ###########
    def dianbiao_all_active_power_electricity_needALL_show(self):
        return self.all_active_power_electricity_needALL

    def dianbiao_all_active_power_electricity_needtimeALL_show(self):
        return self.all_active_power_electricity_needtimeALL

    def dianbiao_all_active_power_electricity_feilv1_needALL_show(self):
        return self.all_active_power_electricity_feilv1_needALL

    def dianbiao_all_active_power_electricity_feilv1_needtimeALL_show(self):
        return self.all_active_power_electricity_feilv1_needtimeALL

    def dianbiao_all_active_power_electricity_feilv2_needALL_show(self):
        return self.all_active_power_electricity_feilv2_needALL

    def dianbiao_all_active_power_electricity_feilv2_needtimeALL_show(self):
        return self.all_active_power_electricity_feilv2_needtimeALL

    def dianbiao_all_active_power_electricity_feilv3_needALL_show(self):
        return self.all_active_power_electricity_feilv3_needALL

    def dianbiao_all_active_power_electricity_feilv3_needtimeALL_show(self):
        return self.all_active_power_electricity_feilv3_needtimeALL

    def dianbiao_all_active_power_electricity_feilv4_needALL_show(self):
        return self.all_active_power_electricity_feilv4_needALL

    def dianbiao_all_active_power_electricity_feilv4_needtimeALL_show(self):
        return self.all_active_power_electricity_feilv4_needtimeALL
    ##############
    def dianbiao_all_active_power_electricity_needALL1_show(self):
        return self.all_active_power_electricity_needALL1

    def dianbiao_all_active_power_electricity_needtimeALL1_show(self):
        return self.all_active_power_electricity_needtimeALL1

    def dianbiao_all_active_power_electricity_feilv1_needALL1_show(self):
        return self.all_active_power_electricity_feilv1_needALL1

    def dianbiao_all_active_power_electricity_feilv1_needtimeALL1_show(self):
        return self.all_active_power_electricity_feilv1_needtimeALL1

    def dianbiao_all_active_power_electricity_feilv2_needALL1_show(self):
        return self.all_active_power_electricity_feilv2_needALL1

    def dianbiao_all_active_power_electricity_feilv2_needtimeALL1_show(self):
        return self.all_active_power_electricity_feilv2_needtimeALL1

    def dianbiao_all_active_power_electricity_feilv3_needALL1_show(self):
        return self.all_active_power_electricity_feilv3_needALL1

    def dianbiao_all_active_power_electricity_feilv3_needtimeALL1_show(self):
        return self.all_active_power_electricity_feilv3_needtimeALL1

    def dianbiao_all_active_power_electricity_feilv4_needALL1_show(self):
        return self.all_active_power_electricity_feilv4_needALL1

    def dianbiao_all_active_power_electricity_feilv4_needtimeALL1_show(self):
        return self.all_active_power_electricity_feilv4_needtimeALL1
    #############
    def dianbiao_all_quadrant1_reactive_power_electricity_needALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_needALL

    def dianbiao_all_quadrant1_reactive_power_electricity_needtimeALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_needtimeALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv1_needALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv1_needALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv1_needtimeALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv1_needtimeALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv2_needALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv2_needALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv2_needtimeALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv2_needtimeALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv3_needALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv3_needALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv3_needtimeALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv3_needtimeALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv4_needALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv4_needALL

    def dianbiao_all_quadrant1_reactive_power_electricity_feilv4_needtimeALL_show(self):
        return self.all_quadrant1_reactive_power_electricity_feilv4_needtimeALL

    #############
    def dianbiao_all_quadrant2_reactive_power_electricity_needALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_needALL

    def dianbiao_all_quadrant2_reactive_power_electricity_needtimeALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_needtimeALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv1_needALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv1_needALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv1_needtimeALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv1_needtimeALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv2_needALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv2_needALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv2_needtimeALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv2_needtimeALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv3_needALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv3_needALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv3_needtimeALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv3_needtimeALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv4_needALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv4_needALL

    def dianbiao_all_quadrant2_reactive_power_electricity_feilv4_needtimeALL_show(self):
        return self.all_quadrant2_reactive_power_electricity_feilv4_needtimeALL

    #############
    def dianbiao_all_quadrant3_reactive_power_electricity_needALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_needALL

    def dianbiao_all_quadrant3_reactive_power_electricity_needtimeALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_needtimeALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv1_needALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv1_needALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv1_needtimeALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv1_needtimeALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv2_needALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv2_needALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv2_needtimeALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv2_needtimeALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv3_needALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv3_needALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv3_needtimeALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv3_needtimeALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv4_needALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv4_needALL

    def dianbiao_all_quadrant3_reactive_power_electricity_feilv4_needtimeALL_show(self):
        return self.all_quadrant3_reactive_power_electricity_feilv4_needtimeALL

    #############
    def dianbiao_all_quadrant4_reactive_power_electricity_needALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_needALL

    def dianbiao_all_quadrant4_reactive_power_electricity_needtimeALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_needtimeALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv1_needALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv1_needALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv1_needtimeALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv1_needtimeALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv2_needALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv2_needALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv2_needtimeALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv2_needtimeALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv3_needALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv3_needALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv3_needtimeALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv3_needtimeALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv4_needALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv4_needALL

    def dianbiao_all_quadrant4_reactive_power_electricity_feilv4_needtimeALL_show(self):
        return self.all_quadrant4_reactive_power_electricity_feilv4_needtimeALL
############
    def dianbiao_all_quadrant_reactive_power_electricity_needstruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL

    ############
    def dianbiao_all_quadrant_reactive_power_electricity_needstruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_needstruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_needtimestruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_needtimestruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL

    def dianbiao_all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL_show(self):
        return self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL
###################################################COLD#######################################################
    def dianbiao_cold_data_set_time_time(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["time_now"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricityA"]+read_all_data_tmp["all_active_power_electricityB"]+read_all_data_tmp["all_active_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1A"]+read_all_data_tmp["all_active_power_electricity_feilv1B"]+read_all_data_tmp["all_active_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2A"]+read_all_data_tmp["all_active_power_electricity_feilv2B"]+read_all_data_tmp["all_active_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3A"]+read_all_data_tmp["all_active_power_electricity_feilv3B"]+read_all_data_tmp["all_active_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4A"]+read_all_data_tmp["all_active_power_electricity_feilv4B"]+read_all_data_tmp["all_active_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricityALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricityA1"] + read_all_data_tmp[
                        "all_active_power_electricityB1"] + read_all_data_tmp["all_active_power_electricityC1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv1ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv1B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv1C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv2ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv2B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv2C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv3ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv3B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv3C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv4ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv4B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv4C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricitySTRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricityA"] + read_all_data_tmp["all_quadrant1_reactive_power_electricityB"]+\
                           read_all_data_tmp["all_quadrant1_reactive_power_electricityC"] + read_all_data_tmp["all_quadrant2_reactive_power_electricityA"]+\
                           read_all_data_tmp["all_quadrant2_reactive_power_electricityB"] + read_all_data_tmp["all_quadrant2_reactive_power_electricityC"]

            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv1STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv1B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv1A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv2STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv2B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv2A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv3STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv3B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv3A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv4STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv4B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv4A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricitySTRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricityA"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricityB"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricityC"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricityA"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricityB"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv1STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv1B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv1A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv2STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv2B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv2A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv3STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv3B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv3A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power_electricity_feilv4STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv4B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv4A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant1_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant1_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant1_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant1_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant1_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant1_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant1_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant2_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant2_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant2_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant2_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant2_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant2_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant2_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant3_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant3_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant3_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant3_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant3_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant3_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant3_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant4_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant4_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant4_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant4_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant4_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant4_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_quadrant4_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv1_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv1_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv2_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv2_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv3_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv3_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv4_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv4_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv1_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv1_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv2_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv2_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv3_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv3_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv4_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_set_time_all_active_power_electricity_feilv4_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_power(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_powerA(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_powerA"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_powerB(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_powerB"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_active_powerC(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_powerC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_set_time_all_reactive_power(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_power"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_set_time_all_reactive_powerA(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_powerA"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_set_time_all_reactive_powerB(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_powerB"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_set_time_all_reactive_powerC(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "set_time" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "set_time" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_powerC"]
            else:
                return 0.0
        except:
            return 0.0
    ##########################################################################################################
    def dianbiao_cold_data_day_time(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["time_now"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricityA"]+read_all_data_tmp["all_active_power_electricityB"]+read_all_data_tmp["all_active_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1A"]+read_all_data_tmp["all_active_power_electricity_feilv1B"]+read_all_data_tmp["all_active_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2A"]+read_all_data_tmp["all_active_power_electricity_feilv2B"]+read_all_data_tmp["all_active_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3A"]+read_all_data_tmp["all_active_power_electricity_feilv3B"]+read_all_data_tmp["all_active_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4A"]+read_all_data_tmp["all_active_power_electricity_feilv4B"]+read_all_data_tmp["all_active_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricityALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricityA1"] + read_all_data_tmp[
                        "all_active_power_electricityB1"] + read_all_data_tmp["all_active_power_electricityC1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv1ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv1B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv1C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv2ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv2B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv2C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv3ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv3B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv3C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv4ALL1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4A1"] + read_all_data_tmp[
                        "all_active_power_electricity_feilv4B1"] + read_all_data_tmp[
                               "all_active_power_electricity_feilv4C1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricitySTRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricityA"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricityB"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricityC"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricityA"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricityB"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv1STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv1B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv1A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv2STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv2B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv2A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv3STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv3B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv3A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv4STRUCT1(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4A"] + read_all_data_tmp[
                        "all_quadrant1_reactive_power_electricity_feilv4B"] + \
                           read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4C"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv4A"] + \
                           read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4B"] + read_all_data_tmp[
                               "all_quadrant2_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricitySTRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricityA"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricityB"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricityC"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricityA"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricityB"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv1STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv1B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv1A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv2STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv2B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv2A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv3STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv3B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv3A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power_electricity_feilv4STRUCT2(self, last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp = os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i] = (dir_list_tmp[i][:12])
            dir_list_tmp[i] = int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if (last_times <= len(dir_list_tmp)):

                document_name_tmp = str(dir_list_tmp[last_times - 1]) + ".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\" + document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4A"] + read_all_data_tmp[
                        "all_quadrant3_reactive_power_electricity_feilv4B"] + \
                           read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4C"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv4A"] + \
                           read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4B"] + read_all_data_tmp[
                               "all_quadrant4_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant1_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant1_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant1_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant1_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant1_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant1_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant1_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant1_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant2_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant2_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant2_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant2_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant2_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant2_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant2_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant2_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant3_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant3_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant3_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant3_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant3_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant3_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant3_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant3_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant4_reactive_power_electricityALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricityA"]+read_all_data_tmp["all_quadrant4_reactive_power_electricityB"]+read_all_data_tmp["all_quadrant4_reactive_power_electricityC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant4_reactive_power_electricity_feilv1ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv1C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant4_reactive_power_electricity_feilv2ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv2C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant4_reactive_power_electricity_feilv3ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv3C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_quadrant4_reactive_power_electricity_feilv4ALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4A"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4B"]+read_all_data_tmp["all_quadrant4_reactive_power_electricity_feilv4C"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv1_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv1_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv2_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv2_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv3_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv3_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needALL"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv4_needtimeALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needtimeALL"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv4_needALL(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needALL"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_day_all_active_power_electricity_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv1_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv1_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv1_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv2_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv2_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv2_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv3_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv3_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv3_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power_electricity_feilv4_needtimeALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needtimeALL1"]
            else:
                return ""
        except:
            return ""

    def dianbiao_cold_data_day_all_active_power_electricity_feilv4_needALL1(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power_electricity_feilv4_needALL1"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_power(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_power"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_powerA(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_powerA"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_powerB(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_powerB"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_active_powerC(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_active_powerC"]
            else:
                return 0.0
        except:
            return 0.0

    def dianbiao_cold_data_day_all_reactive_power(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_power"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_day_all_reactive_powerA(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_powerA"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_day_all_reactive_powerB(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_powerB"]
            else:
                return 0.0
        except:
            return 0.0
    def dianbiao_cold_data_day_all_reactive_powerC(self,last_times):
        dir_pwd_tmp = self.dir_pwd + "cold" + "\\" + "day" + "\\"
        dir_list_tmp=os.listdir(dir_pwd_tmp)
        for i in range(len(dir_list_tmp)):
            dir_list_tmp[i]=(dir_list_tmp[i][:12])
            dir_list_tmp[i]=int(dir_list_tmp[i])
        dir_list_tmp.sort()
        try:
            if(last_times<=len(dir_list_tmp)):

                document_name_tmp=str(dir_list_tmp[last_times-1])+".json"
                with open(self.dir_pwd + "cold" + "\\" + "day" + "\\"+document_name_tmp, "r") as f:
                    read_all_data_tmp = eval(f.read())
                    f.close()
                    return read_all_data_tmp["all_reactive_powerC"]
            else:
                return 0.0
        except:
            return 0.0

    ##############################################################################################################
    def dianbiao_feilv_show(self):
        new_time_data = time.localtime(time.time())
        new_all_min = new_time_data.tm_hour * 60 + new_time_data.tm_min
        for i in range(14):
            try:
                time_tmp_str = self.dict_tmp["feilv_time_" + str(i + 1)]
            except:
                time_tmp_str = ""
            if (len(time_tmp_str) == 0):
                pass
            else:
                time_tmp_list = time_tmp_str.split("-")
                time_tmp_start_list = time_tmp_list[0].split(":")
                time_tmp_start_hour = int(time_tmp_start_list[0])
                time_tmp_start_min = int(time_tmp_start_list[1])

                time_tmp_end_list = time_tmp_list[1].split(":")
                time_tmp_end_hour = int(time_tmp_end_list[0])
                time_tmp_end_min = int(time_tmp_end_list[1])
                if ((time_tmp_end_hour * 60 + time_tmp_end_min) > (time_tmp_start_hour * 60 + time_tmp_start_min)):
                    if ((new_all_min >= (time_tmp_start_hour * 60 + time_tmp_start_min))
                            and (new_all_min < (time_tmp_end_hour * 60 + time_tmp_end_min))):
                        if (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "1"):
                            return u"尖"

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "2"):
                            return u"峰"

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "3"):
                            return u"平"

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "4"):
                            return u"谷"
        return u"费率未设置"
    #################################################################################################################
    # 不显示什么
    #
    def dianbiao_no_show(self):
        return ""

    # 保留多少小数点
    #
    def num_format_float(self,data_tmp, bit_len):
        #保留多少小数
        str_tmp = format(data_tmp, "." + str(bit_len) + "f")
        return float(str_tmp)

    # 时间计算 保存到对应费率内容
    #
    def diaobiao_feilv_calculate(self):
        new_time_data=time.localtime(time.time())
        new_all_min=new_time_data.tm_hour*60+new_time_data.tm_min

        watch_power_electricity_tmpA=self.dianbiao_watch_power_electricity_calculate(self.voltageA, self.currentA)
        watch_power_electricity_tmpB=self.dianbiao_watch_power_electricity_calculate(self.voltageB, self.currentB)
        watch_power_electricity_tmpC=self.dianbiao_watch_power_electricity_calculate(self.voltageC, self.currentC)

        active_power_electricity_tmpA = self.dianbiao_active_power_electricity_calculate(self.voltageA, self.currentA,
                                                                                        self.power_factorA)
        active_power_electricity_tmpB = self.dianbiao_active_power_electricity_calculate(self.voltageB, self.currentB,
                                                                                         self.power_factorB)
        active_power_electricity_tmpC = self.dianbiao_active_power_electricity_calculate(self.voltageC, self.currentC,
                                                                                         self.power_factorC)

        reactive_power_electricity_tmpA = self.dianbiao_reactive_power_electricity_calculate(self.voltageA,
                                                                                            self.currentA,
                                                                                            self.power_factorA)
        reactive_power_electricity_tmpB = self.dianbiao_reactive_power_electricity_calculate(self.voltageB,
                                                                                             self.currentB,
                                                                                             self.power_factorB)
        reactive_power_electricity_tmpC = self.dianbiao_reactive_power_electricity_calculate(self.voltageC,
                                                                                             self.currentC,
                                                                                             self.power_factorC)

        for i in range(14):
            try:
                time_tmp_str=self.dict_tmp["feilv_time_"+str(i+1)]
            except:
                time_tmp_str=""
            if(len(time_tmp_str)==0):
                pass
            else:
                time_tmp_list = time_tmp_str.split("-")
                time_tmp_start_list = time_tmp_list[0].split(":")
                time_tmp_start_hour=int(time_tmp_start_list[0])
                time_tmp_start_min = int(time_tmp_start_list[1])

                time_tmp_end_list = time_tmp_list[1].split(":")
                time_tmp_end_hour=int(time_tmp_end_list[0])
                time_tmp_end_min=int(time_tmp_end_list[1])
                if((time_tmp_end_hour*60+time_tmp_end_min)>(time_tmp_start_hour*60+time_tmp_start_min)):
                    if((new_all_min>=(time_tmp_start_hour*60+time_tmp_start_min))
                            and(new_all_min<(time_tmp_end_hour*60+time_tmp_end_min))):
                        if(self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="1"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv1A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv1A   +=active_power_electricity_tmpA
                                if(self.reactiveA_way==0):
                                    self.all_quadrant1_reactive_power_electricity_feilv1A +=reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv1A +=reactive_power_electricity_tmpA
                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv1A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv1A1 += active_power_electricity_tmpA
                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv1A += reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv1A += reactive_power_electricity_tmpA

                            if (self.activeB_way == 0):
                                self.all_watch_power_electricity_feilv1B += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv1B += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv1B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv1B += reactive_power_electricity_tmpB
                            elif (self.activeB_way == 1):
                                self.all_watch_power_electricity_feilv1B1 += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv1B1 += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv1B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv1B += reactive_power_electricity_tmpB

                            if (self.activeC_way == 0):
                                self.all_watch_power_electricity_feilv1C += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv1C += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv1C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv1C += reactive_power_electricity_tmpC
                            elif (self.activeC_way == 1):
                                self.all_watch_power_electricity_feilv1C1 += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv1C1 += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv1C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv1C += reactive_power_electricity_tmpC

                        elif (self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="2"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv2A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv2A   +=active_power_electricity_tmpA
                                if(self.reactiveA_way==0):
                                    self.all_quadrant1_reactive_power_electricity_feilv2A +=reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv2A +=reactive_power_electricity_tmpA
                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv2A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv2A1 += active_power_electricity_tmpA
                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv2A += reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv2A += reactive_power_electricity_tmpA

                            if (self.activeB_way == 0):
                                self.all_watch_power_electricity_feilv2B += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv2B += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv2B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv2B += reactive_power_electricity_tmpB
                            elif (self.activeB_way == 1):
                                self.all_watch_power_electricity_feilv2B1 += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv2B1 += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv2B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv2B += reactive_power_electricity_tmpB

                            if (self.activeC_way == 0):
                                self.all_watch_power_electricity_feilv2C += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv2C += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv2C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv2C += reactive_power_electricity_tmpC
                            elif (self.activeC_way == 1):
                                self.all_watch_power_electricity_feilv2C1 += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv2C1 += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv2C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv2C += reactive_power_electricity_tmpC

                        elif (self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="3"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv3A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv3A   +=active_power_electricity_tmpA
                                if(self.reactiveA_way==0):
                                    self.all_quadrant1_reactive_power_electricity_feilv3A +=reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv3A +=reactive_power_electricity_tmpA
                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv3A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv3A1 += active_power_electricity_tmpA
                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv3A += reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv3A += reactive_power_electricity_tmpA

                            if (self.activeB_way == 0):
                                self.all_watch_power_electricity_feilv3B += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv3B += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv3B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv3B += reactive_power_electricity_tmpB
                            elif (self.activeB_way == 1):
                                self.all_watch_power_electricity_feilv3B1 += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv3B1 += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv3B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv3B += reactive_power_electricity_tmpB

                            if (self.activeC_way == 0):
                                self.all_watch_power_electricity_feilv3C += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv3C += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv3C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv3C += reactive_power_electricity_tmpC
                            elif (self.activeC_way == 1):
                                self.all_watch_power_electricity_feilv3C1 += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv3C1 += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv3C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv3C += reactive_power_electricity_tmpC

                        elif (self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="4"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv4A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv4A   +=active_power_electricity_tmpA
                                if(self.reactiveA_way==0):
                                    self.all_quadrant1_reactive_power_electricity_feilv4A +=reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv4A +=reactive_power_electricity_tmpA
                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv4A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv4A1 += active_power_electricity_tmpA
                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv4A += reactive_power_electricity_tmpA
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv4A += reactive_power_electricity_tmpA

                            if (self.activeB_way == 0):
                                self.all_watch_power_electricity_feilv4B += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv4B += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv4B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv4B += reactive_power_electricity_tmpB
                            elif (self.activeB_way == 1):
                                self.all_watch_power_electricity_feilv4B1 += watch_power_electricity_tmpB
                                self.all_active_power_electricity_feilv4B1 += active_power_electricity_tmpB
                                if (self.reactiveB_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv4B += reactive_power_electricity_tmpB
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv4B += reactive_power_electricity_tmpB

                            if (self.activeC_way == 0):
                                self.all_watch_power_electricity_feilv4C += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv4C += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv4C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv4C += reactive_power_electricity_tmpC
                            elif (self.activeC_way == 1):
                                self.all_watch_power_electricity_feilv4C1 += watch_power_electricity_tmpC
                                self.all_active_power_electricity_feilv4C1 += active_power_electricity_tmpC
                                if (self.reactiveC_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv4C += reactive_power_electricity_tmpC
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv4C += reactive_power_electricity_tmpC
####################################################################################################################################
    def diaobiao_need_list_append(self):
        self.all_watch_power_electricity_needlistA.append(0)
        self.all_watch_power_electricity_needlistA1.append(0)
        self.all_active_power_electricity_needlistA.append(0)
        self.all_active_power_electricity_needlistA1.append(0)
        self.all_quadrant1_reactive_power_electricity_needlistA.append(0)
        self.all_quadrant2_reactive_power_electricity_needlistA.append(0)
        self.all_quadrant3_reactive_power_electricity_needlistA.append(0)
        self.all_quadrant4_reactive_power_electricity_needlistA.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1A.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2A.append(0)
        self.all_watch_power_electricity_needlistB.append(0)
        self.all_watch_power_electricity_needlistB1.append(0)
        self.all_active_power_electricity_needlistB.append(0)
        self.all_active_power_electricity_needlistB1.append(0)
        self.all_quadrant1_reactive_power_electricity_needlistB.append(0)
        self.all_quadrant2_reactive_power_electricity_needlistB.append(0)
        self.all_quadrant3_reactive_power_electricity_needlistB.append(0)
        self.all_quadrant4_reactive_power_electricity_needlistB.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1B.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2B.append(0)
        self.all_watch_power_electricity_needlistC.append(0)
        self.all_watch_power_electricity_needlistC1.append(0)
        self.all_active_power_electricity_needlistC.append(0)
        self.all_active_power_electricity_needlistC1.append(0)
        self.all_quadrant1_reactive_power_electricity_needlistC.append(0)
        self.all_quadrant2_reactive_power_electricity_needlistC.append(0)
        self.all_quadrant3_reactive_power_electricity_needlistC.append(0)
        self.all_quadrant4_reactive_power_electricity_needlistC.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1C.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2C.append(0)
        self.all_watch_power_electricity_needlistALL.append(0)
        self.all_watch_power_electricity_feilv1_needlistALL.append(0)
        self.all_watch_power_electricity_feilv2_needlistALL.append(0)
        self.all_watch_power_electricity_feilv3_needlistALL.append(0)
        self.all_watch_power_electricity_feilv4_needlistALL.append(0)
        self.all_watch_power_electricity_needlistALL1.append(0)
        self.all_watch_power_electricity_feilv1_needlistALL1.append(0)
        self.all_watch_power_electricity_feilv2_needlistALL1.append(0)
        self.all_watch_power_electricity_feilv3_needlistALL1.append(0)
        self.all_watch_power_electricity_feilv4_needlistALL1.append(0)
        self.all_active_power_electricity_needlistALL.append(0)
        self.all_active_power_electricity_feilv1_needlistALL.append(0)
        self.all_active_power_electricity_feilv2_needlistALL.append(0)
        self.all_active_power_electricity_feilv3_needlistALL.append(0)
        self.all_active_power_electricity_feilv4_needlistALL.append(0)
        self.all_active_power_electricity_needlistALL1.append(0)
        self.all_active_power_electricity_feilv1_needlistALL1.append(0)
        self.all_active_power_electricity_feilv2_needlistALL1.append(0)
        self.all_active_power_electricity_feilv3_needlistALL1.append(0)
        self.all_active_power_electricity_feilv4_needlistALL1.append(0)
        self.all_quadrant1_reactive_power_electricity_needlistALL.append(0)
        self.all_quadrant1_reactive_power_electricity_feilv1_needlistALL.append(0)
        self.all_quadrant1_reactive_power_electricity_feilv2_needlistALL.append(0)
        self.all_quadrant1_reactive_power_electricity_feilv3_needlistALL.append(0)
        self.all_quadrant1_reactive_power_electricity_feilv4_needlistALL.append(0)
        self.all_quadrant2_reactive_power_electricity_needlistALL.append(0)
        self.all_quadrant2_reactive_power_electricity_feilv1_needlistALL.append(0)
        self.all_quadrant2_reactive_power_electricity_feilv2_needlistALL.append(0)
        self.all_quadrant2_reactive_power_electricity_feilv3_needlistALL.append(0)
        self.all_quadrant2_reactive_power_electricity_feilv4_needlistALL.append(0)
        self.all_quadrant3_reactive_power_electricity_needlistALL.append(0)
        self.all_quadrant3_reactive_power_electricity_feilv1_needlistALL.append(0)
        self.all_quadrant3_reactive_power_electricity_feilv2_needlistALL.append(0)
        self.all_quadrant3_reactive_power_electricity_feilv3_needlistALL.append(0)
        self.all_quadrant3_reactive_power_electricity_feilv4_needlistALL.append(0)
        self.all_quadrant4_reactive_power_electricity_needlistALL.append(0)
        self.all_quadrant4_reactive_power_electricity_feilv1_needlistALL.append(0)
        self.all_quadrant4_reactive_power_electricity_feilv2_needlistALL.append(0)
        self.all_quadrant4_reactive_power_electricity_feilv3_needlistALL.append(0)
        self.all_quadrant4_reactive_power_electricity_feilv4_needlistALL.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL.append(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL.append(0)
        self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL.append(0)

    def diaobiao_need_list_change(self,index):
        self.all_watch_power_electricity_needlistA[index]=(0)
        self.all_watch_power_electricity_needlistA1[index]=(0)
        self.all_active_power_electricity_needlistA[index]=(0)
        self.all_active_power_electricity_needlistA1[index]=(0)
        self.all_quadrant1_reactive_power_electricity_needlistA[index]=(0)
        self.all_quadrant2_reactive_power_electricity_needlistA[index]=(0)
        self.all_quadrant3_reactive_power_electricity_needlistA[index]=(0)
        self.all_quadrant4_reactive_power_electricity_needlistA[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1A[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2A[index]=(0)
        self.all_watch_power_electricity_needlistB[index]=(0)
        self.all_watch_power_electricity_needlistB1[index]=(0)
        self.all_active_power_electricity_needlistB[index]=(0)
        self.all_active_power_electricity_needlistB1[index]=(0)
        self.all_quadrant1_reactive_power_electricity_needlistB[index]=(0)
        self.all_quadrant2_reactive_power_electricity_needlistB[index]=(0)
        self.all_quadrant3_reactive_power_electricity_needlistB[index]=(0)
        self.all_quadrant4_reactive_power_electricity_needlistB[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1B[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2B[index]=(0)
        self.all_watch_power_electricity_needlistC[index]=(0)
        self.all_watch_power_electricity_needlistC1[index]=(0)
        self.all_active_power_electricity_needlistC[index]=(0)
        self.all_active_power_electricity_needlistC1[index]=(0)
        self.all_quadrant1_reactive_power_electricity_needlistC[index]=(0)
        self.all_quadrant2_reactive_power_electricity_needlistC[index]=(0)
        self.all_quadrant3_reactive_power_electricity_needlistC[index]=(0)
        self.all_quadrant4_reactive_power_electricity_needlistC[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1C[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2C[index]=(0)
        self.all_watch_power_electricity_needlistALL[index]=(0)
        self.all_watch_power_electricity_feilv1_needlistALL[index]=(0)
        self.all_watch_power_electricity_feilv2_needlistALL[index]=(0)
        self.all_watch_power_electricity_feilv3_needlistALL[index]=(0)
        self.all_watch_power_electricity_feilv4_needlistALL[index]=(0)
        self.all_watch_power_electricity_needlistALL1[index]=(0)
        self.all_watch_power_electricity_feilv1_needlistALL1[index]=(0)
        self.all_watch_power_electricity_feilv2_needlistALL1[index]=(0)
        self.all_watch_power_electricity_feilv3_needlistALL1[index]=(0)
        self.all_watch_power_electricity_feilv4_needlistALL1[index]=(0)
        self.all_active_power_electricity_needlistALL[index]=(0)
        self.all_active_power_electricity_feilv1_needlistALL[index]=(0)
        self.all_active_power_electricity_feilv2_needlistALL[index]=(0)
        self.all_active_power_electricity_feilv3_needlistALL[index]=(0)
        self.all_active_power_electricity_feilv4_needlistALL[index]=(0)
        self.all_active_power_electricity_needlistALL1[index]=(0)
        self.all_active_power_electricity_feilv1_needlistALL1[index]=(0)
        self.all_active_power_electricity_feilv2_needlistALL1[index]=(0)
        self.all_active_power_electricity_feilv3_needlistALL1[index]=(0)
        self.all_active_power_electricity_feilv4_needlistALL1[index]=(0)
        self.all_quadrant1_reactive_power_electricity_needlistALL[index]=(0)
        self.all_quadrant1_reactive_power_electricity_feilv1_needlistALL[index]=(0)
        self.all_quadrant1_reactive_power_electricity_feilv2_needlistALL[index]=(0)
        self.all_quadrant1_reactive_power_electricity_feilv3_needlistALL[index]=(0)
        self.all_quadrant1_reactive_power_electricity_feilv4_needlistALL[index]=(0)
        self.all_quadrant2_reactive_power_electricity_needlistALL[index]=(0)
        self.all_quadrant2_reactive_power_electricity_feilv1_needlistALL[index]=(0)
        self.all_quadrant2_reactive_power_electricity_feilv2_needlistALL[index]=(0)
        self.all_quadrant2_reactive_power_electricity_feilv3_needlistALL[index]=(0)
        self.all_quadrant2_reactive_power_electricity_feilv4_needlistALL[index]=(0)
        self.all_quadrant3_reactive_power_electricity_needlistALL[index]=(0)
        self.all_quadrant3_reactive_power_electricity_feilv1_needlistALL[index]=(0)
        self.all_quadrant3_reactive_power_electricity_feilv2_needlistALL[index]=(0)
        self.all_quadrant3_reactive_power_electricity_feilv3_needlistALL[index]=(0)
        self.all_quadrant3_reactive_power_electricity_feilv4_needlistALL[index]=(0)
        self.all_quadrant4_reactive_power_electricity_needlistALL[index]=(0)
        self.all_quadrant4_reactive_power_electricity_feilv1_needlistALL[index]=(0)
        self.all_quadrant4_reactive_power_electricity_feilv2_needlistALL[index]=(0)
        self.all_quadrant4_reactive_power_electricity_feilv3_needlistALL[index]=(0)
        self.all_quadrant4_reactive_power_electricity_feilv4_needlistALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct1ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_needliststruct2ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[index]=(0)
        self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[index]=(0)
    def diaobiao_need_clean(self):
        new_time_tmp = time.localtime(time.time())
        if (new_time_tmp.tm_hour == 0) and (new_time_tmp.tm_min == 0)and(new_time_tmp.tm_mon==1):
            self.all_watch_power_electricity_needA=0
            self.all_watch_power_electricity_needA1=0
            self.all_active_power_electricity_needA=0
            self.all_active_power_electricity_needA1=0
            self.all_quadrant1_reactive_power_electricity_needA=0
            self.all_quadrant2_reactive_power_electricity_needA=0
            self.all_quadrant3_reactive_power_electricity_needA=0
            self.all_quadrant4_reactive_power_electricity_needA=0
            self.all_quadrant_reactive_power_electricity_needstruct1A=0
            self.all_quadrant_reactive_power_electricity_needstruct2A=0

            self.all_watch_power_electricity_needB = 0
            self.all_watch_power_electricity_needB1 = 0
            self.all_active_power_electricity_needB = 0
            self.all_active_power_electricity_needB1 = 0
            self.all_quadrant1_reactive_power_electricity_needB = 0
            self.all_quadrant2_reactive_power_electricity_needB = 0
            self.all_quadrant3_reactive_power_electricity_needB = 0
            self.all_quadrant4_reactive_power_electricity_needB = 0
            self.all_quadrant_reactive_power_electricity_needstruct1B = 0
            self.all_quadrant_reactive_power_electricity_needstruct2B = 0

            self.all_watch_power_electricity_needC = 0
            self.all_watch_power_electricity_needC1 = 0
            self.all_active_power_electricity_needC = 0
            self.all_active_power_electricity_needC1 = 0
            self.all_quadrant1_reactive_power_electricity_needC = 0
            self.all_quadrant2_reactive_power_electricity_needC = 0
            self.all_quadrant3_reactive_power_electricity_needC = 0
            self.all_quadrant4_reactive_power_electricity_needC = 0
            self.all_quadrant_reactive_power_electricity_needstruct1C = 0
            self.all_quadrant_reactive_power_electricity_needstruct2C = 0

            self.all_watch_power_electricity_needALL=0
            self.all_watch_power_electricity_needALL1=0
            self.all_active_power_electricity_needALL=0
            self.all_active_power_electricity_needALL1=0
            self.all_quadrant1_reactive_power_electricity_needALL=0
            self.all_quadrant2_reactive_power_electricity_needALL=0
            self.all_quadrant3_reactive_power_electricity_needALL=0
            self.all_quadrant4_reactive_power_electricity_needALL=0
            self.all_quadrant_reactive_power_electricity_needstruct1ALL=0
            self.all_quadrant_reactive_power_electricity_needstruct2ALL=0


            self.all_watch_power_electricity_feilv1_needALL=0
            self.all_watch_power_electricity_feilv1_needALL1=0
            self.all_active_power_electricity_feilv1_needALL=0
            self.all_active_power_electricity_feilv1_needALL1=0
            self.all_quadrant1_reactive_power_electricity_feilv1_needALL=0
            self.all_quadrant2_reactive_power_electricity_feilv1_needALL=0
            self.all_quadrant3_reactive_power_electricity_feilv1_needALL=0
            self.all_quadrant4_reactive_power_electricity_feilv1_needALL=0
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL=0
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL=0

            self.all_watch_power_electricity_feilv2_needALL = 0
            self.all_watch_power_electricity_feilv2_needALL1 = 0
            self.all_active_power_electricity_feilv2_needALL = 0
            self.all_active_power_electricity_feilv2_needALL1 = 0
            self.all_quadrant1_reactive_power_electricity_feilv2_needALL = 0
            self.all_quadrant2_reactive_power_electricity_feilv2_needALL = 0
            self.all_quadrant3_reactive_power_electricity_feilv2_needALL = 0
            self.all_quadrant4_reactive_power_electricity_feilv2_needALL = 0
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL = 0
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL = 0

            self.all_watch_power_electricity_feilv3_needALL = 0
            self.all_watch_power_electricity_feilv3_needALL1 = 0
            self.all_active_power_electricity_feilv3_needALL = 0
            self.all_active_power_electricity_feilv3_needALL1 = 0
            self.all_quadrant1_reactive_power_electricity_feilv3_needALL = 0
            self.all_quadrant2_reactive_power_electricity_feilv3_needALL = 0
            self.all_quadrant3_reactive_power_electricity_feilv3_needALL = 0
            self.all_quadrant4_reactive_power_electricity_feilv3_needALL = 0
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL = 0
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL = 0

            self.all_watch_power_electricity_feilv4_needALL = 0
            self.all_watch_power_electricity_feilv4_needALL1 = 0
            self.all_active_power_electricity_feilv4_needALL = 0
            self.all_active_power_electricity_feilv4_needALL1 = 0
            self.all_quadrant1_reactive_power_electricity_feilv4_needALL = 0
            self.all_quadrant2_reactive_power_electricity_feilv4_needALL = 0
            self.all_quadrant3_reactive_power_electricity_feilv4_needALL = 0
            self.all_quadrant4_reactive_power_electricity_feilv4_needALL = 0
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL = 0
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL = 0

    # 时间计算 保存需量的东西
    #
    def diaobiao_need_calculate(self):
        new_time_data = time.localtime(time.time())
        new_all_min = new_time_data.tm_hour * 60 + new_time_data.tm_min

        watch_power_tmpA = self.dianbiao_watch_power_calculate(self.voltageA, self.currentA)
        watch_power_tmpB = self.dianbiao_watch_power_calculate(self.voltageB, self.currentB)
        watch_power_tmpC = self.dianbiao_watch_power_calculate(self.voltageC, self.currentC)

        active_power_tmpA = self.dianbiao_active_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        active_power_tmpB = self.dianbiao_active_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        active_power_tmpC = self.dianbiao_active_power_calculate(self.voltageC,self.currentC,self.power_factorC)

        reactive_power_tmpA = self.dianbiao_reactive_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        reactive_power_tmpB = self.dianbiao_reactive_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        reactive_power_tmpC = self.dianbiao_reactive_power_calculate(self.voltageC,self.currentC,self.power_factorC)
        len_tmp = len(self.all_watch_power_electricity_needlistA)

        if (len_tmp < (15 * 60 / self.electricity_time)):
            self.diaobiao_need_list_append()
        else:
            self.diaobiao_need_list_change(self.power_need_index)


        ########################################################

        if (self.activeA_way == 0):
            self.all_watch_power_electricity_needlistA[self.power_need_index]=(watch_power_tmpA)
            self.all_active_power_electricity_needlistA[self.power_need_index]=(active_power_tmpA)
            if(self.reactiveA_way==0):
                self.all_quadrant1_reactive_power_electricity_needlistA[self.power_need_index]=(reactive_power_tmpA)
                self.all_quadrant_reactive_power_electricity_needliststruct1A[self.power_need_index]=(reactive_power_tmpA)
                #self.all_quadrant_reactive_power_electricity_needliststruct2A[self.power_need_index]=(reactive_power_tmpA)
            else:
                self.all_quadrant4_reactive_power_electricity_needlistA[self.power_need_index]=(reactive_power_tmpA)
                #self.all_quadrant_reactive_power_electricity_needliststruct1A[self.power_need_index]=(-reactive_power_tmpA)
                self.all_quadrant_reactive_power_electricity_needliststruct2A[self.power_need_index]=(reactive_power_tmpA)
        else:
            self.all_watch_power_electricity_needlistA1[self.power_need_index]=(watch_power_tmpA)
            self.all_active_power_electricity_needlistA1[self.power_need_index]=(active_power_tmpA)
            if (self.reactiveA_way == 0):
                self.all_quadrant2_reactive_power_electricity_needlistA[self.power_need_index]=(reactive_power_tmpA)
                self.all_quadrant_reactive_power_electricity_needliststruct1A[self.power_need_index]=(reactive_power_tmpA)
                #self.all_quadrant_reactive_power_electricity_needliststruct2A[self.power_need_index]=(reactive_power_tmpA)
            else:
                self.all_quadrant3_reactive_power_electricity_needlistA[self.power_need_index]=(reactive_power_tmpA)
                #self.all_quadrant_reactive_power_electricity_needliststruct1A[self.power_need_index]=(-reactive_power_tmpA)
                self.all_quadrant_reactive_power_electricity_needliststruct2A[self.power_need_index]=(reactive_power_tmpA)

        if (self.activeB_way == 0):
            self.all_watch_power_electricity_needlistB[self.power_need_index]=(watch_power_tmpB)
            self.all_active_power_electricity_needlistB[self.power_need_index]=(active_power_tmpB)
            if(self.reactiveB_way==0):
                self.all_quadrant1_reactive_power_electricity_needlistB[self.power_need_index]=(reactive_power_tmpB)
                self.all_quadrant_reactive_power_electricity_needliststruct1B[self.power_need_index]=(reactive_power_tmpB)
                #self.all_quadrant_reactive_power_electricity_needliststruct2B[self.power_need_index]=(reactive_power_tmpB)
            else:
                self.all_quadrant4_reactive_power_electricity_needlistB[self.power_need_index]=(reactive_power_tmpB)
                #self.all_quadrant_reactive_power_electricity_needliststruct1B[self.power_need_index]=(-reactive_power_tmpB)
                self.all_quadrant_reactive_power_electricity_needliststruct2B[self.power_need_index]=(reactive_power_tmpB)
        else:
            self.all_watch_power_electricity_needlistB1[self.power_need_index]=(watch_power_tmpB)
            self.all_active_power_electricity_needlistB1[self.power_need_index]=(active_power_tmpB)
            if (self.reactiveA_way == 0):
                self.all_quadrant2_reactive_power_electricity_needlistB[self.power_need_index]=(reactive_power_tmpB)
                self.all_quadrant_reactive_power_electricity_needliststruct1B[self.power_need_index]=(reactive_power_tmpB)
                #self.all_quadrant_reactive_power_electricity_needliststruct2B[self.power_need_index]=(reactive_power_tmpB)
            else:
                self.all_quadrant3_reactive_power_electricity_needlistB[self.power_need_index]=(reactive_power_tmpB)
                #self.all_quadrant_reactive_power_electricity_needliststruct1B[self.power_need_index]=(-reactive_power_tmpB)
                self.all_quadrant_reactive_power_electricity_needliststruct2B[self.power_need_index]=(reactive_power_tmpB)

        if (self.activeC_way == 0):
            self.all_watch_power_electricity_needlistC[self.power_need_index]=(watch_power_tmpC)
            self.all_active_power_electricity_needlistC[self.power_need_index]=(active_power_tmpC)
            if (self.reactiveC_way == 0):
                self.all_quadrant1_reactive_power_electricity_needlistC[self.power_need_index]=(reactive_power_tmpC)
                self.all_quadrant_reactive_power_electricity_needliststruct1C[self.power_need_index]=(reactive_power_tmpC)
                #self.all_quadrant_reactive_power_electricity_needliststruct2C[self.power_need_index]=(reactive_power_tmpC)
            else:
                self.all_quadrant4_reactive_power_electricity_needlistC[self.power_need_index]=(reactive_power_tmpC)
                #self.all_quadrant_reactive_power_electricity_needliststruct1C[self.power_need_index]=(-reactive_power_tmpC)
                self.all_quadrant_reactive_power_electricity_needliststruct2C[self.power_need_index]=(reactive_power_tmpC)
        else:
            self.all_watch_power_electricity_needlistC1[self.power_need_index]=(watch_power_tmpC)
            self.all_active_power_electricity_needlistC1[self.power_need_index]=(active_power_tmpC)
            if (self.reactiveC_way == 0):
                self.all_quadrant2_reactive_power_electricity_needlistC[self.power_need_index]=(reactive_power_tmpC)
                self.all_quadrant_reactive_power_electricity_needliststruct1C[self.power_need_index]=(reactive_power_tmpC)
                #self.all_quadrant_reactive_power_electricity_needliststruct2C[self.power_need_index]=(reactive_power_tmpC)
            else:
                self.all_quadrant3_reactive_power_electricity_needlistC[self.power_need_index]=(reactive_power_tmpC)
                #self.all_quadrant_reactive_power_electricity_needliststruct1C[self.power_need_index]=(-reactive_power_tmpC)
                self.all_quadrant_reactive_power_electricity_needliststruct2C[self.power_need_index]=(reactive_power_tmpC)
        #################################ALL######################################################################
        all_watch_power = watch_power_tmpA+watch_power_tmpB+watch_power_tmpC
        all_active_power = active_power_tmpA + active_power_tmpB + active_power_tmpC
        all_reactive_power_tmp=reactive_power_tmpA+reactive_power_tmpB+reactive_power_tmpC

        if (self.activeA_way == 0):
            self.all_watch_power_electricity_needlistALL[self.power_need_index]=(all_watch_power)
            self.all_active_power_electricity_needlistALL[self.power_need_index]=(all_active_power)

            if(self.reactiveA_way == 0):
                self.all_quadrant1_reactive_power_electricity_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                self.all_quadrant_reactive_power_electricity_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                #self.all_quadrant_reactive_power_electricity_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
            else:
                self.all_quadrant4_reactive_power_electricity_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                #self.all_quadrant_reactive_power_electricity_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                self.all_quadrant_reactive_power_electricity_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
        else:
            self.all_watch_power_electricity_needlistALL1[self.power_need_index]=(all_watch_power)
            self.all_active_power_electricity_needlistALL1[self.power_need_index]=(all_active_power)
            if (self.reactiveA_way == 0):
                self.all_quadrant2_reactive_power_electricity_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                self.all_quadrant_reactive_power_electricity_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                #self.all_quadrant_reactive_power_electricity_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
            else:
                self.all_quadrant3_reactive_power_electricity_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                #self.all_quadrant_reactive_power_electricity_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                self.all_quadrant_reactive_power_electricity_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)

        for i in range(14):
            try:
                time_tmp_str = self.dict_tmp["feilv_time_" + str(i + 1)]
            except:
                time_tmp_str = ""
            if (len(time_tmp_str) == 0):
                pass
            else:
                time_tmp_list = time_tmp_str.split("-")
                time_tmp_start_list = time_tmp_list[0].split(":")
                time_tmp_start_hour = int(time_tmp_start_list[0])
                time_tmp_start_min = int(time_tmp_start_list[1])

                time_tmp_end_list = time_tmp_list[1].split(":")
                time_tmp_end_hour = int(time_tmp_end_list[0])
                time_tmp_end_min = int(time_tmp_end_list[1])
                if ((time_tmp_end_hour * 60 + time_tmp_end_min) > (time_tmp_start_hour * 60 + time_tmp_start_min)):
                    if ((new_all_min >= (time_tmp_start_hour * 60 + time_tmp_start_min))
                            and (new_all_min < (time_tmp_end_hour * 60 + time_tmp_end_min))):
                        if (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "1"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv1_needlistALL[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv1_needlistALL[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv1_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv1_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv1_needlistALL1[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv1_needlistALL1[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv1_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv1_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "2"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv2_needlistALL[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv2_needlistALL[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv2_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv2_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv2_needlistALL1[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv2_needlistALL1[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv2_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv2_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "3"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv3_needlistALL[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv3_needlistALL[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv3_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv3_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv3_needlistALL1[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv3_needlistALL1[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv3_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv3_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "4"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv4_needlistALL[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv4_needlistALL[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant1_reactive_power_electricity_feilv4_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant4_reactive_power_electricity_feilv4_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv4_needlistALL1[self.power_need_index]=(all_watch_power)
                                self.all_active_power_electricity_feilv4_needlistALL1[self.power_need_index]=(all_active_power)

                                if (self.reactiveA_way == 0):
                                    self.all_quadrant2_reactive_power_electricity_feilv4_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
                                else:
                                    self.all_quadrant3_reactive_power_electricity_feilv4_needlistALL[self.power_need_index]=(all_reactive_power_tmp)
                                    #self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[self.power_need_index]=(-all_reactive_power_tmp)
                                    self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[self.power_need_index]=(all_reactive_power_tmp)
        #########################################################
        self.power_need_index = self.power_need_index + 1
        if (self.power_need_index == (15 * 60 / self.electricity_time)):
            self.power_need_index = 0
        ##################################################################
        len_tmp = len(self.all_watch_power_electricity_needlistA)
        ava_tmp_all=0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needA):
            self.all_watch_power_electricity_needA = max_power_need_tmp
            self.all_watch_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistA1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needA1):
            self.all_watch_power_electricity_needA1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeA1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needA):
            self.all_active_power_electricity_needA = max_power_need_tmp
            self.all_active_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistA1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needA1):
            self.all_active_power_electricity_needA1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeA1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())


        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needA):
            self.all_quadrant1_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needA):
            self.all_quadrant2_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needA):
            self.all_quadrant3_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needA):
            self.all_quadrant4_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1A[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1A):
            self.all_quadrant_reactive_power_electricity_needstruct1A = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1A = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2A[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2A):
            self.all_quadrant_reactive_power_electricity_needstruct2A = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2A = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needB):
            self.all_watch_power_electricity_needB = max_power_need_tmp
            self.all_watch_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistB1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needB1):
            self.all_watch_power_electricity_needB1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeB1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needB):
            self.all_active_power_electricity_needB = max_power_need_tmp
            self.all_active_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistB1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needB1):
            self.all_active_power_electricity_needB1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeB1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needB):
            self.all_quadrant1_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needB):
            self.all_quadrant2_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needB):
            self.all_quadrant3_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needB):
            self.all_quadrant4_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1B[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1B):
            self.all_quadrant_reactive_power_electricity_needstruct1B = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1B = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2B[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2B):
            self.all_quadrant_reactive_power_electricity_needstruct2B = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2B = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needC):
            self.all_watch_power_electricity_needC = max_power_need_tmp
            self.all_watch_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistC1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needC1):
            self.all_watch_power_electricity_needC1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeC1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needC):
            self.all_active_power_electricity_needC = max_power_need_tmp
            self.all_active_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistC1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needC1):
            self.all_active_power_electricity_needC1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeC1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needC):
            self.all_quadrant1_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needC):
            self.all_quadrant2_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needC):
            self.all_quadrant3_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needC):
            self.all_quadrant4_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1C[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1C):
            self.all_quadrant_reactive_power_electricity_needstruct1C = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1C = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2C[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2C):
            self.all_quadrant_reactive_power_electricity_needstruct2C = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2C = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())
        ######################################ALL################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needALL):
            self.all_watch_power_electricity_needALL = max_power_need_tmp
            self.all_watch_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needALL1):
            self.all_watch_power_electricity_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needALL):
            self.all_active_power_electricity_needALL = max_power_need_tmp
            self.all_active_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needALL1):
            self.all_active_power_electricity_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needALL):
            self.all_quadrant1_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needALL):
            self.all_quadrant2_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needALL):
            self.all_quadrant3_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needALL):
            self.all_quadrant4_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())
#########################################################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv1_needALL):
            self.all_watch_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv1_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv1_needALL1):
            self.all_watch_power_electricity_feilv1_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv1_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv1_needALL):
            self.all_active_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv1_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv1_needALL1):
            self.all_active_power_electricity_feilv1_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv1_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
        ##########################################################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv2_needALL):
            self.all_watch_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv2_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv2_needALL1):
            self.all_watch_power_electricity_feilv2_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv2_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv2_needALL):
            self.all_active_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv2_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv2_needALL1):
            self.all_active_power_electricity_feilv2_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv2_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
        ############################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv3_needALL):
            self.all_watch_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv3_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv3_needALL1):
            self.all_watch_power_electricity_feilv3_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv3_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv3_needALL):
            self.all_active_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv3_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv3_needALL1):
            self.all_active_power_electricity_feilv3_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv3_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
        ####################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv4_needALL):
            self.all_watch_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv4_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv4_needALL1):
            self.all_watch_power_electricity_feilv4_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv4_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv4_needALL):
            self.all_active_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv4_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv4_needALL1):
            self.all_active_power_electricity_feilv4_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv4_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

    def dianbiao_debug(self):
        pass
        print( u"时间time is %s \r\n"
               u"地址address is %s\r\n"
               u"A相电压voltageA is %f\r\n"
               u"A相电流currentA is %f\r\n"
               u"A相功率因子power_factorA is %f\r\n"
               u"A相有功方向activeA_way is %d\r\n"
               u"A相无功方向reactiveA_way is %d\r\n"
               u"频率frequency is %f\r\n"
               u"A相全部正向视在电能all_watch_power_electricityA is %f\r\n"
               u"A相全部反向视在电能all_watch_power_electricityA1 is %f\r\n"
               u"A相全部正向有功电能all_active_power_electricityA is %f\r\n"
               u"A相全部反向向有功电能all_active_power_electricityA1 is %f\r\n"
               u"A相全部正向向有功费率1电能active_power_electricity_feilv1A is %f\r\n"
               u"A相全部正向向有功费率2电能active_power_electricity_feilv2A is %f\r\n"
               u"A相全部正向向有功费率3电能active_power_electricity_feilv3A is %f\r\n"
               u"A相全部正向向有功费率4电能active_power_electricity_feilv4A is %f\r\n"
               u"A相第1象限我要无功电能all_quadrant1_reactive_power_electricityA is %f\r\n"
               u"A相第2象限我要无功电能all_quadrant2_reactive_power_electricityA is %f\r\n"
               u"A相第3象限我要无功电能all_quadrant3_reactive_power_electricityA is %f\r\n"
               u"A相第4象限我要无功电能all_quadrant4_reactive_power_electricityA is %f\r\n"
               u"A相可视最大电量时间all_watch_power_electricity_needtimeA is %s\r\n"
               u"A相可视最大电量all_watch_power_electricity_needA is %f\r\n"
               u"可视最大电量时间all_watch_power_electricity_needtimeALL is %s\r\n"
               u"可视最大电量时间all_watch_power_electricity_needALL is %f\r\n"
               %(
                time.strftime("%Y-%m-%d-%H-%M", time.localtime()),
               self.address,self.voltageA,self.currentA,self.power_factorA,self.activeA_way,self.reactiveA_way,
               self.frequency,
               self.all_watch_power_electricityA,self.all_watch_power_electricityA1,
               self.all_active_power_electricityA, self.all_active_power_electricityA1,
               self.all_active_power_electricity_feilv1A,self.all_active_power_electricity_feilv2A,self.all_active_power_electricity_feilv3A,self.all_active_power_electricity_feilv4A,
               self.all_quadrant1_reactive_power_electricityA,self.all_quadrant2_reactive_power_electricityA,self.all_quadrant3_reactive_power_electricityA,self.all_quadrant4_reactive_power_electricityA,
               self.all_watch_power_electricity_needtimeA,self.all_watch_power_electricity_needA,
               self.all_watch_power_electricity_needtimeALL, self.all_watch_power_electricity_needALL,
        )
        )
    def dianbiao_log_write(self):
        tmp_str =time.strftime("%Y-%m-%d-%H-%M", time.localtime())
        tmp_str +=":"

        tmp_str += str(self.electricity_time)
        tmp_str += ":"

        tmp_str +=str(self.voltageA)
        tmp_str +=":"
        tmp_str += str(self.currentA)
        tmp_str += ":"
        tmp_str += str(self.power_factorA)
        tmp_str += ":"
        tmp_str += str(self.activeA_way)
        tmp_str += ":"
        tmp_str += str(self.reactiveA_way)
        tmp_str += ":"

        tmp_str += str(self.voltageB)
        tmp_str += ":"
        tmp_str += str(self.currentB)
        tmp_str += ":"
        tmp_str += str(self.power_factorB)
        tmp_str += ":"
        tmp_str += str(self.activeB_way)
        tmp_str += ":"
        tmp_str += str(self.reactiveB_way)
        tmp_str += ":"

        tmp_str += str(self.voltageC)
        tmp_str += ":"
        tmp_str += str(self.currentC)
        tmp_str += ":"
        tmp_str += str(self.power_factorC)
        tmp_str += ":"
        tmp_str += str(self.activeC_way)
        tmp_str += ":"
        tmp_str += str(self.reactiveC_way)

        tmp_str += "\r"
        self.cold_data_write_log(time.strftime("%Y-%m-%d", time.localtime()),tmp_str)
    def dianbiao_cold_data(self):
        self.write_all_data["time_now"] = time.strftime("%Y-%m-%d-%H-%M", time.localtime())
        #############################################################
        self.write_all_data["all_active_power"] = self.dianbiao_active_power_calculate(self.voltageA, self.currentA,
                                                                                       self.power_factorA) \
                                                  + self.dianbiao_active_power_calculate(self.voltageB, self.currentB,
                                                                                         self.power_factorB) \
                                                  + self.dianbiao_active_power_calculate(self.voltageC, self.currentC,
                                                                                         self.power_factorC)
        self.write_all_data["all_active_powerA"] = self.dianbiao_active_power_calculate(self.voltageA, self.currentA,
                                                                                        self.power_factorA)
        self.write_all_data["all_active_powerB"] = self.dianbiao_active_power_calculate(self.voltageB, self.currentB,
                                                                                        self.power_factorB)
        self.write_all_data["all_active_powerC"] = self.dianbiao_active_power_calculate(self.voltageC, self.currentC,
                                                                                        self.power_factorC)
        self.write_all_data["all_reactive_power"] = self.dianbiao_reactive_power_calculate(self.voltageA, self.currentA,
                                                                                           self.power_factorA) \
                                                    + self.dianbiao_reactive_power_calculate(self.voltageB,
                                                                                             self.currentB,
                                                                                             self.power_factorB) \
                                                    + self.dianbiao_reactive_power_calculate(self.voltageC,
                                                                                             self.currentC,
                                                                                             self.power_factorC)
        self.write_all_data["all_reactive_powerA"] = self.dianbiao_reactive_power_calculate(self.voltageA,
                                                                                            self.currentA,
                                                                                            self.power_factorA)
        self.write_all_data["all_reactive_powerB"] = self.dianbiao_reactive_power_calculate(self.voltageB,
                                                                                            self.currentB,
                                                                                            self.power_factorB)
        self.write_all_data["all_reactive_powerC"] = self.dianbiao_reactive_power_calculate(self.voltageC,
                                                                                            self.currentC,
                                                                                            self.power_factorC)
        #############################################################
        self.write_all_data["all_watch_power_electricityA"] = self.all_watch_power_electricityA
        self.write_all_data["all_watch_power_electricity_feilv1A"] = self.all_watch_power_electricity_feilv1A
        self.write_all_data["all_watch_power_electricity_feilv2A"] = self.all_watch_power_electricity_feilv2A
        self.write_all_data["all_watch_power_electricity_feilv3A"] = self.all_watch_power_electricity_feilv3A
        self.write_all_data["all_watch_power_electricity_feilv4A"] = self.all_watch_power_electricity_feilv4A

        self.write_all_data["all_watch_power_electricityA1"] = self.all_watch_power_electricityA1
        self.write_all_data["all_watch_power_electricity_feilv1A1"] = self.all_watch_power_electricity_feilv1A1
        self.write_all_data["all_watch_power_electricity_feilv2A1"] = self.all_watch_power_electricity_feilv2A1
        self.write_all_data["all_watch_power_electricity_feilv3A1"] = self.all_watch_power_electricity_feilv3A1
        self.write_all_data["all_watch_power_electricity_feilv4A1"] = self.all_watch_power_electricity_feilv4A1

        self.write_all_data["all_active_power_electricityA"] = self.all_active_power_electricityA
        self.write_all_data["all_active_power_electricity_feilv1A"] = self.all_active_power_electricity_feilv1A
        self.write_all_data["all_active_power_electricity_feilv2A"] = self.all_active_power_electricity_feilv2A
        self.write_all_data["all_active_power_electricity_feilv3A"] = self.all_active_power_electricity_feilv3A
        self.write_all_data["all_active_power_electricity_feilv4A"] = self.all_active_power_electricity_feilv4A

        self.write_all_data["all_active_power_electricityA1"] = self.all_active_power_electricityA1
        self.write_all_data["all_active_power_electricity_feilv1A1"] = self.all_active_power_electricity_feilv1A1
        self.write_all_data["all_active_power_electricity_feilv2A1"] = self.all_active_power_electricity_feilv2A1
        self.write_all_data["all_active_power_electricity_feilv3A1"] = self.all_active_power_electricity_feilv3A1
        self.write_all_data["all_active_power_electricity_feilv4A1"] = self.all_active_power_electricity_feilv4A1

        self.write_all_data["all_quadrant1_reactive_power_electricityA"] = self.all_quadrant1_reactive_power_electricityA
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv1A"] = self.all_quadrant1_reactive_power_electricity_feilv1A
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv2A"] = self.all_quadrant1_reactive_power_electricity_feilv2A
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv3A"] = self.all_quadrant1_reactive_power_electricity_feilv3A
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv4A"] = self.all_quadrant1_reactive_power_electricity_feilv4A

        self.write_all_data[
            "all_quadrant2_reactive_power_electricityA"] = self.all_quadrant2_reactive_power_electricityA
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv1A"] = self.all_quadrant2_reactive_power_electricity_feilv1A
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv2A"] = self.all_quadrant2_reactive_power_electricity_feilv2A
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv3A"] = self.all_quadrant2_reactive_power_electricity_feilv3A
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv4A"] = self.all_quadrant2_reactive_power_electricity_feilv4A

        self.write_all_data[
            "all_quadrant3_reactive_power_electricityA"] = self.all_quadrant3_reactive_power_electricityA
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv1A"] = self.all_quadrant3_reactive_power_electricity_feilv1A
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv2A"] = self.all_quadrant3_reactive_power_electricity_feilv2A
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv3A"] = self.all_quadrant3_reactive_power_electricity_feilv3A
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv4A"] = self.all_quadrant3_reactive_power_electricity_feilv4A

        self.write_all_data[
            "all_quadrant4_reactive_power_electricityA"] = self.all_quadrant4_reactive_power_electricityA
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv1A"] = self.all_quadrant4_reactive_power_electricity_feilv1A
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv2A"] = self.all_quadrant4_reactive_power_electricity_feilv2A
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv3A"] = self.all_quadrant4_reactive_power_electricity_feilv3A
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv4A"] = self.all_quadrant4_reactive_power_electricity_feilv4A

        self.write_all_data["all_watch_power_electricityB"] = self.all_watch_power_electricityB
        self.write_all_data["all_watch_power_electricity_feilv1B"] = self.all_watch_power_electricity_feilv1B
        self.write_all_data["all_watch_power_electricity_feilv2B"] = self.all_watch_power_electricity_feilv2B
        self.write_all_data["all_watch_power_electricity_feilv3B"] = self.all_watch_power_electricity_feilv3B
        self.write_all_data["all_watch_power_electricity_feilv4B"] = self.all_watch_power_electricity_feilv4B

        self.write_all_data["all_watch_power_electricityB1"] = self.all_watch_power_electricityB1
        self.write_all_data["all_watch_power_electricity_feilv1B1"] = self.all_watch_power_electricity_feilv1B1
        self.write_all_data["all_watch_power_electricity_feilv2B1"] = self.all_watch_power_electricity_feilv2B1
        self.write_all_data["all_watch_power_electricity_feilv3B1"] = self.all_watch_power_electricity_feilv3B1
        self.write_all_data["all_watch_power_electricity_feilv4B1"] = self.all_watch_power_electricity_feilv4B1

        self.write_all_data["all_active_power_electricityB"] = self.all_active_power_electricityB
        self.write_all_data["all_active_power_electricity_feilv1B"] = self.all_active_power_electricity_feilv1B
        self.write_all_data["all_active_power_electricity_feilv2B"] = self.all_active_power_electricity_feilv2B
        self.write_all_data["all_active_power_electricity_feilv3B"] = self.all_active_power_electricity_feilv3B
        self.write_all_data["all_active_power_electricity_feilv4B"] = self.all_active_power_electricity_feilv4B

        self.write_all_data["all_active_power_electricityB1"] = self.all_active_power_electricityB1
        self.write_all_data["all_active_power_electricity_feilv1B1"] = self.all_active_power_electricity_feilv1B1
        self.write_all_data["all_active_power_electricity_feilv2B1"] = self.all_active_power_electricity_feilv2B1
        self.write_all_data["all_active_power_electricity_feilv3B1"] = self.all_active_power_electricity_feilv3B1
        self.write_all_data["all_active_power_electricity_feilv4B1"] = self.all_active_power_electricity_feilv4B1

        self.write_all_data["all_quadrant1_reactive_power_electricityB"] = self.all_quadrant1_reactive_power_electricityB
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv1B"] = self.all_quadrant1_reactive_power_electricity_feilv1B
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv2B"] = self.all_quadrant1_reactive_power_electricity_feilv2B
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv3B"] = self.all_quadrant1_reactive_power_electricity_feilv3B
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv4B"] = self.all_quadrant1_reactive_power_electricity_feilv4B

        self.write_all_data[
            "all_quadrant2_reactive_power_electricityB"] = self.all_quadrant2_reactive_power_electricityB
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv1B"] = self.all_quadrant2_reactive_power_electricity_feilv1B
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv2B"] = self.all_quadrant2_reactive_power_electricity_feilv2B
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv3B"] = self.all_quadrant2_reactive_power_electricity_feilv3B
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv4B"] = self.all_quadrant2_reactive_power_electricity_feilv4B

        self.write_all_data[
            "all_quadrant3_reactive_power_electricityB"] = self.all_quadrant3_reactive_power_electricityB
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv1B"] = self.all_quadrant3_reactive_power_electricity_feilv1B
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv2B"] = self.all_quadrant3_reactive_power_electricity_feilv2B
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv3B"] = self.all_quadrant3_reactive_power_electricity_feilv3B
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv4B"] = self.all_quadrant3_reactive_power_electricity_feilv4B

        self.write_all_data[
            "all_quadrant4_reactive_power_electricityB"] = self.all_quadrant4_reactive_power_electricityB
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv1B"] = self.all_quadrant4_reactive_power_electricity_feilv1B
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv2B"] = self.all_quadrant4_reactive_power_electricity_feilv2B
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv3B"] = self.all_quadrant4_reactive_power_electricity_feilv3B
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv4B"] = self.all_quadrant4_reactive_power_electricity_feilv4B

        self.write_all_data["all_watch_power_electricityC"] = self.all_watch_power_electricityC
        self.write_all_data["all_watch_power_electricity_feilv1C"] = self.all_watch_power_electricity_feilv1C
        self.write_all_data["all_watch_power_electricity_feilv2C"] = self.all_watch_power_electricity_feilv2C
        self.write_all_data["all_watch_power_electricity_feilv3C"] = self.all_watch_power_electricity_feilv3C
        self.write_all_data["all_watch_power_electricity_feilv4C"] = self.all_watch_power_electricity_feilv4C

        self.write_all_data["all_watch_power_electricityC1"] = self.all_watch_power_electricityC1
        self.write_all_data["all_watch_power_electricity_feilv1C1"] = self.all_watch_power_electricity_feilv1C1
        self.write_all_data["all_watch_power_electricity_feilv2C1"] = self.all_watch_power_electricity_feilv2C1
        self.write_all_data["all_watch_power_electricity_feilv3C1"] = self.all_watch_power_electricity_feilv3C1
        self.write_all_data["all_watch_power_electricity_feilv4C1"] = self.all_watch_power_electricity_feilv4C1

        self.write_all_data["all_active_power_electricityC"] = self.all_active_power_electricityC
        self.write_all_data["all_active_power_electricity_feilv1C"] = self.all_active_power_electricity_feilv1C
        self.write_all_data["all_active_power_electricity_feilv2C"] = self.all_active_power_electricity_feilv2C
        self.write_all_data["all_active_power_electricity_feilv3C"] = self.all_active_power_electricity_feilv3C
        self.write_all_data["all_active_power_electricity_feilv4C"] = self.all_active_power_electricity_feilv4C

        self.write_all_data["all_active_power_electricityC1"] = self.all_active_power_electricityC1
        self.write_all_data["all_active_power_electricity_feilv1C1"] = self.all_active_power_electricity_feilv1C1
        self.write_all_data["all_active_power_electricity_feilv2C1"] = self.all_active_power_electricity_feilv2C1
        self.write_all_data["all_active_power_electricity_feilv3C1"] = self.all_active_power_electricity_feilv3C1
        self.write_all_data["all_active_power_electricity_feilv4C1"] = self.all_active_power_electricity_feilv4C1

        self.write_all_data["all_quadrant1_reactive_power_electricityC"] = self.all_quadrant1_reactive_power_electricityC
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv1C"] = self.all_quadrant1_reactive_power_electricity_feilv1C
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv2C"] = self.all_quadrant1_reactive_power_electricity_feilv2C
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv3C"] = self.all_quadrant1_reactive_power_electricity_feilv3C
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv4C"] = self.all_quadrant1_reactive_power_electricity_feilv4C

        self.write_all_data[
            "all_quadrant2_reactive_power_electricityC"] = self.all_quadrant2_reactive_power_electricityC
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv1C"] = self.all_quadrant2_reactive_power_electricity_feilv1C
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv2C"] = self.all_quadrant2_reactive_power_electricity_feilv2C
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv3C"] = self.all_quadrant2_reactive_power_electricity_feilv3C
        self.write_all_data[
            "all_quadrant2_reactive_power_electricity_feilv4C"] = self.all_quadrant2_reactive_power_electricity_feilv4C

        self.write_all_data[
            "all_quadrant3_reactive_power_electricityC"] = self.all_quadrant3_reactive_power_electricityC
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv1C"] = self.all_quadrant3_reactive_power_electricity_feilv1C
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv2C"] = self.all_quadrant3_reactive_power_electricity_feilv2C
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv3C"] = self.all_quadrant3_reactive_power_electricity_feilv3C
        self.write_all_data[
            "all_quadrant3_reactive_power_electricity_feilv4C"] = self.all_quadrant3_reactive_power_electricity_feilv4C

        self.write_all_data[
            "all_quadrant4_reactive_power_electricityC"] = self.all_quadrant4_reactive_power_electricityC
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv1C"] = self.all_quadrant4_reactive_power_electricity_feilv1C
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv2C"] = self.all_quadrant4_reactive_power_electricity_feilv2C
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv3C"] = self.all_quadrant4_reactive_power_electricity_feilv3C
        self.write_all_data[
            "all_quadrant4_reactive_power_electricity_feilv4C"] = self.all_quadrant4_reactive_power_electricity_feilv4C

        #############################可能不需要####################################
        self.write_all_data[
            "all_active_power_electricityALL"]=self.all_active_power_electricityA+self.all_active_power_electricityB+self.all_active_power_electricityC
        self.write_all_data[
            "all_active_power_electricityALL1"] = self.all_active_power_electricityA1 + self.all_active_power_electricityB1 + self.all_active_power_electricityC1

        self.write_all_data[
            "all_reactive_power_electricityALL_quadrant1"]=self.all_quadrant1_reactive_power_electricityA+self.all_quadrant1_reactive_power_electricityB+self.all_quadrant1_reactive_power_electricityC
        self.write_all_data[
            "all_reactive_power_electricityALL_quadrant2"]=self.all_quadrant2_reactive_power_electricityA+self.all_quadrant2_reactive_power_electricityB+self.all_quadrant2_reactive_power_electricityC
        self.write_all_data[
            "all_reactive_power_electricityALL_quadrant3"]=self.all_quadrant3_reactive_power_electricityA+self.all_quadrant3_reactive_power_electricityB+self.all_quadrant3_reactive_power_electricityC
        self.write_all_data[
            "all_reactive_power_electricityALL_quadrant4"]=self.all_quadrant4_reactive_power_electricityA+self.all_quadrant4_reactive_power_electricityB+self.all_quadrant4_reactive_power_electricityC
        ##最大需求
        #########################################A#########################################################
        self.write_all_data["all_watch_power_electricity_needA"]=self.all_watch_power_electricity_needA
        self.write_all_data["all_watch_power_electricity_needtimeA"]=self.all_watch_power_electricity_needtimeA
        self.write_all_data["all_watch_power_electricity_needA1"]=self.all_watch_power_electricity_needA1
        self.write_all_data["all_watch_power_electricity_needtimeA1"]=self.all_watch_power_electricity_needtimeA1
        self.write_all_data["all_active_power_electricity_needA"]=self.all_active_power_electricity_needA
        self.write_all_data["all_active_power_electricity_needtimeA"]=self.all_active_power_electricity_needtimeA
        self.write_all_data["all_active_power_electricity_needA1"]=self.all_active_power_electricity_needA1
        self.write_all_data["all_active_power_electricity_needtimeA1"]=self.all_active_power_electricity_needtimeA1
        self.write_all_data["all_quadrant1_reactive_power_electricity_needA"]=self.all_quadrant1_reactive_power_electricity_needA
        self.write_all_data["all_quadrant1_reactive_power_electricity_needtimeA"]=self.all_quadrant1_reactive_power_electricity_needtimeA
        self.write_all_data["all_quadrant2_reactive_power_electricity_needA"]=self.all_quadrant2_reactive_power_electricity_needA
        self.write_all_data["all_quadrant2_reactive_power_electricity_needtimeA"]=self.all_quadrant2_reactive_power_electricity_needtimeA
        self.write_all_data["all_quadrant3_reactive_power_electricity_needA"]=self.all_quadrant3_reactive_power_electricity_needA
        self.write_all_data["all_quadrant3_reactive_power_electricity_needtimeA"]=self.all_quadrant3_reactive_power_electricity_needtimeA
        self.write_all_data["all_quadrant4_reactive_power_electricity_needA"]=self.all_quadrant4_reactive_power_electricity_needA
        self.write_all_data["all_quadrant4_reactive_power_electricity_needtimeA"]=self.all_quadrant4_reactive_power_electricity_needtimeA
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct1A"]=self.all_quadrant_reactive_power_electricity_needstruct1A
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct1A"]=self.all_quadrant_reactive_power_electricity_needtimestruct1A
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct2A"]=self.all_quadrant_reactive_power_electricity_needstruct2A
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct2A"]=self.all_quadrant_reactive_power_electricity_needtimestruct2A
        #########################################B#########################################################
        self.write_all_data["all_watch_power_electricity_needB"] = self.all_watch_power_electricity_needB
        self.write_all_data["all_watch_power_electricity_needtimeB"] = self.all_watch_power_electricity_needtimeB
        self.write_all_data["all_watch_power_electricity_needB1"] = self.all_watch_power_electricity_needB1
        self.write_all_data["all_watch_power_electricity_needtimeB1"] = self.all_watch_power_electricity_needtimeB1
        self.write_all_data["all_active_power_electricity_needB"] = self.all_active_power_electricity_needB
        self.write_all_data["all_active_power_electricity_needtimeB"] = self.all_active_power_electricity_needtimeB
        self.write_all_data["all_active_power_electricity_needB1"] = self.all_active_power_electricity_needB1
        self.write_all_data["all_active_power_electricity_needtimeB1"] = self.all_active_power_electricity_needtimeB1
        self.write_all_data["all_quadrant1_reactive_power_electricity_needB"] = self.all_quadrant1_reactive_power_electricity_needB
        self.write_all_data["all_quadrant1_reactive_power_electricity_needtimeB"] = self.all_quadrant1_reactive_power_electricity_needtimeB
        self.write_all_data["all_quadrant2_reactive_power_electricity_needB"] = self.all_quadrant2_reactive_power_electricity_needB
        self.write_all_data["all_quadrant2_reactive_power_electricity_needtimeB"] = self.all_quadrant2_reactive_power_electricity_needtimeB
        self.write_all_data["all_quadrant3_reactive_power_electricity_needB"] = self.all_quadrant3_reactive_power_electricity_needB
        self.write_all_data["all_quadrant3_reactive_power_electricity_needtimeB"] = self.all_quadrant3_reactive_power_electricity_needtimeB
        self.write_all_data["all_quadrant4_reactive_power_electricity_needB"] = self.all_quadrant4_reactive_power_electricity_needB
        self.write_all_data["all_quadrant4_reactive_power_electricity_needtimeB"] = self.all_quadrant4_reactive_power_electricity_needtimeB
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct1B"] = self.all_quadrant_reactive_power_electricity_needstruct1B
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct1B"] = self.all_quadrant_reactive_power_electricity_needtimestruct1B
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct2B"] = self.all_quadrant_reactive_power_electricity_needstruct2B
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct2B"] = self.all_quadrant_reactive_power_electricity_needtimestruct2B

        #########################################C#########################################################
        self.write_all_data["all_watch_power_electricity_needC"] = self.all_watch_power_electricity_needC
        self.write_all_data["all_watch_power_electricity_needtimeC"] = self.all_watch_power_electricity_needtimeC
        self.write_all_data["all_watch_power_electricity_needC1"] = self.all_watch_power_electricity_needC1
        self.write_all_data["all_watch_power_electricity_needtimeC1"] = self.all_watch_power_electricity_needtimeC1
        self.write_all_data["all_active_power_electricity_needC"] = self.all_active_power_electricity_needC
        self.write_all_data["all_active_power_electricity_needtimeC"] = self.all_active_power_electricity_needtimeC
        self.write_all_data["all_active_power_electricity_needC1"] = self.all_active_power_electricity_needC1
        self.write_all_data["all_active_power_electricity_needtimeC1"] = self.all_active_power_electricity_needtimeC1
        self.write_all_data["all_quadrant1_reactive_power_electricity_needC"] = self.all_quadrant1_reactive_power_electricity_needC
        self.write_all_data["all_quadrant1_reactive_power_electricity_needtimeC"] = self.all_quadrant1_reactive_power_electricity_needtimeC
        self.write_all_data["all_quadrant2_reactive_power_electricity_needC"] = self.all_quadrant2_reactive_power_electricity_needC
        self.write_all_data["all_quadrant2_reactive_power_electricity_needtimeC"] = self.all_quadrant2_reactive_power_electricity_needtimeC
        self.write_all_data["all_quadrant3_reactive_power_electricity_needC"] = self.all_quadrant3_reactive_power_electricity_needC
        self.write_all_data["all_quadrant3_reactive_power_electricity_needtimeC"] = self.all_quadrant3_reactive_power_electricity_needtimeC
        self.write_all_data["all_quadrant4_reactive_power_electricity_needC"] = self.all_quadrant4_reactive_power_electricity_needC
        self.write_all_data["all_quadrant4_reactive_power_electricity_needtimeC"] = self.all_quadrant4_reactive_power_electricity_needtimeC
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct1C"] = self.all_quadrant_reactive_power_electricity_needstruct1C
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct1C"] = self.all_quadrant_reactive_power_electricity_needtimestruct1C
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct2C"] = self.all_quadrant_reactive_power_electricity_needstruct2C
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct2C"] = self.all_quadrant_reactive_power_electricity_needtimestruct2C
        ########################################################################
        self.write_all_data["all_watch_power_electricity_needALL"]=self.all_watch_power_electricity_needALL
        self.write_all_data["all_watch_power_electricity_needtimeALL"]=self.all_watch_power_electricity_needtimeALL
        self.write_all_data["all_watch_power_electricity_feilv1_needALL"]=self.all_watch_power_electricity_feilv1_needALL
        self.write_all_data["all_watch_power_electricity_feilv1_needtimeALL"]=self.all_watch_power_electricity_feilv1_needtimeALL
        self.write_all_data["all_watch_power_electricity_feilv2_needALL"]=self.all_watch_power_electricity_feilv2_needALL
        self.write_all_data["all_watch_power_electricity_feilv2_needtimeALL"]=self.all_watch_power_electricity_feilv2_needtimeALL
        self.write_all_data["all_watch_power_electricity_feilv3_needALL"]=self.all_watch_power_electricity_feilv3_needALL
        self.write_all_data["all_watch_power_electricity_feilv3_needtimeALL"]=self.all_watch_power_electricity_feilv3_needtimeALL
        self.write_all_data["all_watch_power_electricity_feilv4_needALL"]=self.all_watch_power_electricity_feilv4_needALL
        self.write_all_data["all_watch_power_electricity_feilv4_needtimeALL"]=self.all_watch_power_electricity_feilv4_needtimeALL
        self.write_all_data["all_watch_power_electricity_needALL1"]=self.all_watch_power_electricity_needALL1
        self.write_all_data["all_watch_power_electricity_needtimeALL1"]=self.all_watch_power_electricity_needtimeALL1
        self.write_all_data["all_watch_power_electricity_feilv1_needALL1"]=self.all_watch_power_electricity_feilv1_needALL1
        self.write_all_data["all_watch_power_electricity_feilv1_needtimeALL1"]=self.all_watch_power_electricity_feilv1_needtimeALL1
        self.write_all_data["all_watch_power_electricity_feilv2_needALL1"]=self.all_watch_power_electricity_feilv2_needALL1
        self.write_all_data["all_watch_power_electricity_feilv2_needtimeALL1"]=self.all_watch_power_electricity_feilv2_needtimeALL1
        self.write_all_data["all_watch_power_electricity_feilv3_needALL1"]=self.all_watch_power_electricity_feilv3_needALL1
        self.write_all_data["all_watch_power_electricity_feilv3_needtimeALL1"]=self.all_watch_power_electricity_feilv3_needtimeALL1
        self.write_all_data["all_watch_power_electricity_feilv4_needALL1"]=self.all_watch_power_electricity_feilv4_needALL1
        self.write_all_data["all_watch_power_electricity_feilv4_needtimeALL1"]=self.all_watch_power_electricity_feilv4_needtimeALL1

        self.write_all_data["all_active_power_electricity_needALL"]=self.all_active_power_electricity_needALL
        self.write_all_data["all_active_power_electricity_needtimeALL"]=self.all_active_power_electricity_needtimeALL
        self.write_all_data["all_active_power_electricity_feilv1_needALL"]=self.all_active_power_electricity_feilv1_needALL
        self.write_all_data["all_active_power_electricity_feilv1_needtimeALL"]=self.all_active_power_electricity_feilv1_needtimeALL
        self.write_all_data["all_active_power_electricity_feilv2_needALL"]=self.all_active_power_electricity_feilv2_needALL
        self.write_all_data["all_active_power_electricity_feilv2_needtimeALL"]=self.all_active_power_electricity_feilv2_needtimeALL
        self.write_all_data["all_active_power_electricity_feilv3_needALL"] = self.all_active_power_electricity_feilv3_needALL
        self.write_all_data["all_active_power_electricity_feilv3_needtimeALL"] = self.all_active_power_electricity_feilv3_needtimeALL
        self.write_all_data["all_active_power_electricity_feilv4_needALL"] = self.all_active_power_electricity_feilv4_needALL
        self.write_all_data["all_active_power_electricity_feilv4_needtimeALL"] = self.all_active_power_electricity_feilv4_needtimeALL

        self.write_all_data["all_active_power_electricity_needALL1"] = self.all_active_power_electricity_needALL1
        self.write_all_data["all_active_power_electricity_needtimeALL1"] = self.all_active_power_electricity_needtimeALL1
        self.write_all_data["all_active_power_electricity_feilv1_needALL1"] = self.all_active_power_electricity_feilv1_needALL1
        self.write_all_data["all_active_power_electricity_feilv1_needtimeALL1"] = self.all_active_power_electricity_feilv1_needtimeALL1
        self.write_all_data["all_active_power_electricity_feilv2_needALL1"] = self.all_active_power_electricity_feilv2_needALL1
        self.write_all_data["all_active_power_electricity_feilv2_needtimeALL1"] = self.all_active_power_electricity_feilv2_needtimeALL1
        self.write_all_data["all_active_power_electricity_feilv3_needALL1"] = self.all_active_power_electricity_feilv3_needALL1
        self.write_all_data["all_active_power_electricity_feilv3_needtimeALL1"] = self.all_active_power_electricity_feilv3_needtimeALL1
        self.write_all_data["all_active_power_electricity_feilv4_needALL1"] = self.all_active_power_electricity_feilv4_needALL1
        self.write_all_data["all_active_power_electricity_feilv4_needtimeALL1"] = self.all_active_power_electricity_feilv4_needtimeALL1

        self.write_all_data["all_quadrant1_reactive_power_electricity_needALL"]=self.all_quadrant1_reactive_power_electricity_needALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_needtimeALL"]=self.all_quadrant1_reactive_power_electricity_needtimeALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv1_needALL"]=self.all_quadrant1_reactive_power_electricity_feilv1_needALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv1_needtimeALL"]=self.all_quadrant1_reactive_power_electricity_feilv1_needtimeALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv2_needALL"] = self.all_quadrant1_reactive_power_electricity_feilv2_needALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv2_needtimeALL"] = self.all_quadrant1_reactive_power_electricity_feilv2_needtimeALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv3_needALL"] = self.all_quadrant1_reactive_power_electricity_feilv3_needALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv3_needtimeALL"] = self.all_quadrant1_reactive_power_electricity_feilv3_needtimeALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv4_needALL"] = self.all_quadrant1_reactive_power_electricity_feilv4_needALL
        self.write_all_data["all_quadrant1_reactive_power_electricity_feilv4_needtimeALL"] = self.all_quadrant1_reactive_power_electricity_feilv4_needtimeALL

        self.write_all_data["all_quadrant2_reactive_power_electricity_needALL"] = self.all_quadrant2_reactive_power_electricity_needALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_needtimeALL"] = self.all_quadrant2_reactive_power_electricity_needtimeALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv1_needALL"] = self.all_quadrant2_reactive_power_electricity_feilv1_needALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv1_needtimeALL"] = self.all_quadrant2_reactive_power_electricity_feilv1_needtimeALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv2_needALL"] = self.all_quadrant2_reactive_power_electricity_feilv2_needALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv2_needtimeALL"] = self.all_quadrant2_reactive_power_electricity_feilv2_needtimeALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv3_needALL"] = self.all_quadrant2_reactive_power_electricity_feilv3_needALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv3_needtimeALL"] = self.all_quadrant2_reactive_power_electricity_feilv3_needtimeALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv4_needALL"] = self.all_quadrant2_reactive_power_electricity_feilv4_needALL
        self.write_all_data["all_quadrant2_reactive_power_electricity_feilv4_needtimeALL"] = self.all_quadrant2_reactive_power_electricity_feilv4_needtimeALL

        self.write_all_data["all_quadrant3_reactive_power_electricity_needALL"] = self.all_quadrant3_reactive_power_electricity_needALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_needtimeALL"] = self.all_quadrant3_reactive_power_electricity_needtimeALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv1_needALL"] = self.all_quadrant3_reactive_power_electricity_feilv1_needALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv1_needtimeALL"] = self.all_quadrant3_reactive_power_electricity_feilv1_needtimeALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv2_needALL"] = self.all_quadrant3_reactive_power_electricity_feilv2_needALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv2_needtimeALL"] = self.all_quadrant3_reactive_power_electricity_feilv2_needtimeALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv3_needALL"] = self.all_quadrant3_reactive_power_electricity_feilv3_needALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv3_needtimeALL"] = self.all_quadrant3_reactive_power_electricity_feilv3_needtimeALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv4_needALL"] = self.all_quadrant3_reactive_power_electricity_feilv4_needALL
        self.write_all_data["all_quadrant3_reactive_power_electricity_feilv4_needtimeALL"] = self.all_quadrant3_reactive_power_electricity_feilv4_needtimeALL

        self.write_all_data["all_quadrant4_reactive_power_electricity_needALL"] = self.all_quadrant4_reactive_power_electricity_needALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_needtimeALL"] = self.all_quadrant4_reactive_power_electricity_needtimeALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv1_needALL"] = self.all_quadrant4_reactive_power_electricity_feilv1_needALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv1_needtimeALL"] = self.all_quadrant4_reactive_power_electricity_feilv1_needtimeALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv2_needALL"] = self.all_quadrant4_reactive_power_electricity_feilv2_needALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv2_needtimeALL"] = self.all_quadrant4_reactive_power_electricity_feilv2_needtimeALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv3_needALL"] = self.all_quadrant4_reactive_power_electricity_feilv3_needALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv3_needtimeALL"] = self.all_quadrant4_reactive_power_electricity_feilv3_needtimeALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv4_needALL"] = self.all_quadrant4_reactive_power_electricity_feilv4_needALL
        self.write_all_data["all_quadrant4_reactive_power_electricity_feilv4_needtimeALL"] = self.all_quadrant4_reactive_power_electricity_feilv4_needtimeALL
        #
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct1ALL"]=self.all_quadrant_reactive_power_electricity_needstruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct1ALL"]=self.all_quadrant_reactive_power_electricity_needtimestruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL"]=self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL"]=self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL"] = self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL"] = self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL"] = self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL"] = self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL"] = self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL"] = self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL
        #
        self.write_all_data["all_quadrant_reactive_power_electricity_needstruct2ALL"] = self.all_quadrant_reactive_power_electricity_needstruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_needtimestruct2ALL"] = self.all_quadrant_reactive_power_electricity_needtimestruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL
        self.write_all_data["all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL"] = self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL

        # 当前时间
        self.new_time = time.localtime(time.time())
        if (self.new_time.tm_hour == 0) and (self.new_time.tm_min == 0):
            self.cold_data_write_sp_day(time.strftime("%Y%m%d%H%M", time.localtime()))
        # 每个整点 算定时冻结
        if (self.new_time.tm_min == 0):
            self.cold_data_write_sp_set_time(time.strftime("%Y%m%d%H%M", time.localtime()))
        #try:
            #if (self.dict_tmp["cold_way"] == u"无特别要求"):
                #pass

            #elif (self.dict_tmp["cold_way"] == u"定时冻结"):

                #if (len(self.dict_tmp["cold_way_data"]) == 5):
                    #list_tmp = self.dict_tmp["cold_way_data"].split(":")
                    #hour_tmp = int(list_tmp[0])
                    #min_tmp = int(int(list_tmp[1]))
                    #if ((self.new_time.tm_hour == hour_tmp) and (self.new_time.tm_min == min_tmp)):
                        #self.cold_data_write_sp_set_time(time.strftime("%Y%m%d%H%M", time.localtime()))

            #elif (self.dict_tmp["cold_way"] == u"整点冻结"):
                #每个整点
                #if ( self.new_time.tm_min == 0):
                    #self.cold_data_write_sp_hour(time.strftime("%Y%m%d%H%M", time.localtime()))

            #elif (self.dict_tmp["cold_way"] == u"分钟冻结"):
                #if (len(self.dict_tmp["cold_way_data"]) == 2):
                    #if (self.new_time.tm_min == int(self.dict_tmp["cold_way_data"])):
                        #self.cold_data_write_sp_min(time.strftime("%Y%m%d%H%M", time.localtime()))
        #except:
            #pass
    ####################################################################################################
    def dianbiao_voltage_creatA(self):
        return 220 + float(random.randint(-220, 220)) / 10  # 1位小数

    def dianbiao_voltage_creatB(self):
        return 220 + float(random.randint(-220, 220)) / 10  # 1位小数

    def dianbiao_voltage_creatC(self):
        return 220 + float(random.randint(-220, 220)) / 10  # 1位小数

    def dianbiao_current_creatA(self):
        return float(random.randint(0, int(self.max_current) * 1000)) / 1000

    def dianbiao_current_creatB(self):
        return float(random.randint(0, int(self.max_current) * 1000)) / 1000

    def dianbiao_current_creatC(self):
        return float(random.randint(0, int(self.max_current) * 1000)) / 1000

    def dianbiao_power_factor_creatA(self):
        return float(random.randint(8500, 10000)) / 10000  # 2位小数 +百分比

    def dianbiao_power_factor_creatB(self):
        return float(random.randint(8500, 10000)) / 10000  # 2位小数 +百分比

    def dianbiao_power_factor_creatC(self):
        return float(random.randint(8500, 10000)) / 10000  # 2位小数 +百分比

    def dianbiao_active_way_creatA(self):
        if (random.randint(0, 23)==10):
            return 1
        else:
            return 0

    def dianbiao_active_way_creatB(self):
        if (random.randint(0, 23)==10):
            return 1
        else:
            return 0

    def dianbiao_active_way_creatC(self):
        if (random.randint(0, 23)==10):
            return 1
        else:
            return 0


    def dianbiao_reactive_way_creatA(self):
        if (random.randint(0, 23) == 10):
            return 1
        else:
            return 0

    def dianbiao_reactive_way_creatB(self):
        if (random.randint(0, 23)==10):
            return 1
        else:
            return 0
    def dianbiao_reactive_way_creatC(self):
        if (random.randint(0, 23)==10):
            return 1
        else:
            return 0
##############################计算###########################################
    # 计算各个参数
    #关机函数
    def calculate_powers(self,time_tmp):
        self.electricity_time=time_tmp
        self.voltageA = self.dianbiao_voltage_creatA()
        self.voltageB = self.dianbiao_voltage_creatB()
        self.voltageC = self.dianbiao_voltage_creatC()

        self.currentA = self.dianbiao_current_creatA()
        self.currentB = self.dianbiao_current_creatB()
        self.currentC = self.dianbiao_current_creatC()

        self.power_factorA = self.dianbiao_power_factor_creatA()
        self.power_factorB = self.dianbiao_power_factor_creatB()
        self.power_factorC = self.dianbiao_power_factor_creatC()

        self.activeA_way = self.dianbiao_active_way_creatA()
        self.activeB_way = self.dianbiao_active_way_creatA()
        self.activeC_way = self.dianbiao_active_way_creatA()

        self.reactiveA_way = self.dianbiao_reactive_way_creatA()
        self.reactiveB_way = self.dianbiao_reactive_way_creatA()
        self.reactiveC_way = self.dianbiao_reactive_way_creatA()

        self.frequency = 50+float(random.randint(-5,5))/10#1位小数

        #视在电能
        watch_powerA_tmp = self.dianbiao_watch_power_calculate(self.voltageA, self.currentA)
        watch_powerB_tmp = self.dianbiao_watch_power_calculate(self.voltageB, self.currentB)
        watch_powerC_tmp = self.dianbiao_watch_power_calculate(self.voltageC, self.currentC)
        # 当前视在一分钟电量
        watch_power_electricityA_tmp = watch_powerA_tmp * time_tmp / 3600000
        watch_power_electricityB_tmp = watch_powerB_tmp * time_tmp / 3600000
        watch_power_electricityC_tmp = watch_powerC_tmp * time_tmp / 3600000

        #当前有功功率电能
        active_powerA_tmp = self.dianbiao_active_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        active_powerB_tmp = self.dianbiao_active_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        active_powerC_tmp = self.dianbiao_active_power_calculate(self.voltageC,self.currentC,self.power_factorC)
        # 当前有功一分钟电量
        active_power_electricityA_tmp = active_powerA_tmp * time_tmp / 3600000
        active_power_electricityB_tmp = active_powerB_tmp * time_tmp / 3600000
        active_power_electricityC_tmp = active_powerC_tmp * time_tmp / 3600000

        # 当前无功功率
        reactive_powerA_tmp = self.dianbiao_reactive_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        reactive_powerB_tmp = self.dianbiao_reactive_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        reactive_powerC_tmp = self.dianbiao_reactive_power_calculate(self.voltageC,self.currentC,self.power_factorC)
        # 当前无功一分钟电量
        reactive_power_electricityA_tmp = reactive_powerA_tmp * time_tmp / 3600000
        reactive_power_electricityB_tmp = reactive_powerB_tmp * time_tmp / 3600000
        reactive_power_electricityC_tmp = reactive_powerC_tmp * time_tmp / 3600000

        active_powerALL_tmp=active_powerA_tmp+active_powerB_tmp+active_powerC_tmp
        reactive_powerALL_tmp=reactive_powerA_tmp+reactive_powerB_tmp+reactive_powerC_tmp
        #总功率因子
        self.power_factorALL= (active_powerALL_tmp)/(math.sqrt(active_powerALL_tmp*active_powerALL_tmp+reactive_powerALL_tmp*reactive_powerALL_tmp))


        if (self.activeA_way == 0):
            self.all_watch_power_electricityA  += watch_power_electricityA_tmp
            self.all_active_power_electricityA += active_power_electricityA_tmp
            if (self.reactiveA_way == 0):
                self.all_quadrant1_reactive_power_electricityA += reactive_power_electricityA_tmp
            else:
                self.all_quadrant4_reactive_power_electricityA += reactive_power_electricityA_tmp
        elif (self.activeA_way == 1):
            self.all_watch_power_electricityA1  += watch_power_electricityA_tmp
            self.all_active_power_electricityA1 += active_power_electricityA_tmp
            if (self.reactiveA_way == 0):
                self.all_quadrant2_reactive_power_electricityA += reactive_power_electricityA_tmp
            else:
                self.all_quadrant3_reactive_power_electricityA += reactive_power_electricityA_tmp

        if (self.activeB_way == 0):
            self.all_watch_power_electricityB  += watch_power_electricityB_tmp
            self.all_active_power_electricityB += active_power_electricityB_tmp
            if (self.reactiveB_way == 0):
                self.all_quadrant1_reactive_power_electricityB += reactive_power_electricityB_tmp
            else:
                self.all_quadrant4_reactive_power_electricityB += reactive_power_electricityB_tmp
        elif (self.activeB_way == 1):
            self.all_watch_power_electricityB1  += watch_power_electricityB_tmp
            self.all_active_power_electricityB1 += active_power_electricityB_tmp
            if (self.reactiveB_way == 0):
                self.all_quadrant2_reactive_power_electricityB += reactive_power_electricityB_tmp
            else:
                self.all_quadrant3_reactive_power_electricityB += reactive_power_electricityB_tmp

        if (self.activeC_way == 0):
            self.all_watch_power_electricityC  += watch_power_electricityC_tmp
            self.all_active_power_electricityC += active_power_electricityC_tmp
            if (self.reactiveC_way == 0):
                self.all_quadrant1_reactive_power_electricityC += reactive_power_electricityC_tmp
            else:
                self.all_quadrant4_reactive_power_electricityC += reactive_power_electricityC_tmp
        elif (self.activeC_way == 1):
            self.all_watch_power_electricityC1  += watch_power_electricityC_tmp
            self.all_active_power_electricityC1 += active_power_electricityC_tmp
            if (self.reactiveC_way == 0):
                self.all_quadrant2_reactive_power_electricityC += reactive_power_electricityC_tmp
            else:
                self.all_quadrant3_reactive_power_electricityC += reactive_power_electricityC_tmp

        ###需量计算###########################################################################
        self.diaobiao_need_clean()
        self.diaobiao_need_calculate()
        ###费率表计算##########################################################################
        self.diaobiao_feilv_calculate()
        ########################################################################################
        self.dianbiao_cold_data()
        self.cold_data_write()
        self.dianbiao_log_write()
        #self.dianbiao_debug()


class tree_tree_meter(tree_four_meter):
    def dianbiao_voltage_creatA(self):
        return 380 + float(random.randint(-380, 380)) / 10  # 1位小数

    def dianbiao_voltage_creatB(self):
        return 0

    def dianbiao_voltage_creatC(self):
        return 380 + float(random.randint(-380, 380)) / 10  # 1位小数

    def dianbiao_current_creatA(self):
        return float(random.randint(0, int(self.max_current) * 1000)) / 1000  # 3位小数

    def dianbiao_current_creatB(self):
        return 0

    def dianbiao_current_creatC(self):
        return float(random.randint(0, int(self.max_current) * 1000)) / 1000  # 3位小数

    def dianbiao_power_factor_creatA(self):
        return float(random.randint(8500, 10000)) / 10000  # 2位小数 +百分比

    def dianbiao_power_factor_creatB(self):
        return 0

    def dianbiao_power_factor_creatC(self):
        return float(random.randint(8500, 10000)) / 10000  # 2位小数 +百分比

class one_one_meter(tree_four_meter):
    def dianbiao_voltage_creatB(self):
        return 0

    def dianbiao_voltage_creatC(self):
        return 0

    def dianbiao_current_creatB(self):
        return 0

    def dianbiao_current_creatC(self):
        return 0

    def dianbiao_power_factor_creatB(self):
        return 0

    def dianbiao_power_factor_creatC(self):
        return 0

    def dianbiao_active_way_creatA(self):
        return 0

    def dianbiao_reactive_way_creatA(self):
        return 0
########################################################################################################################
    def diaobiao_need_calculate(self):
        new_time_data = time.localtime(time.time())
        new_all_min = new_time_data.tm_hour * 60 + new_time_data.tm_min

        watch_power_tmpA = self.dianbiao_watch_power_calculate(self.voltageA, self.currentA)
        watch_power_tmpB = self.dianbiao_watch_power_calculate(self.voltageB, self.currentB)
        watch_power_tmpC = self.dianbiao_watch_power_calculate(self.voltageC, self.currentC)

        active_power_tmpA = self.dianbiao_active_power_calculate(self.voltageA, self.currentA, self.power_factorA)
        active_power_tmpB = self.dianbiao_active_power_calculate(self.voltageB, self.currentB, self.power_factorB)
        active_power_tmpC = self.dianbiao_active_power_calculate(self.voltageC, self.currentC, self.power_factorC)

        reactive_power_tmpA = self.dianbiao_reactive_power_calculate(self.voltageA, self.currentA,
                                                                     self.power_factorA)
        reactive_power_tmpB = self.dianbiao_reactive_power_calculate(self.voltageB, self.currentB,
                                                                     self.power_factorB)
        reactive_power_tmpC = self.dianbiao_reactive_power_calculate(self.voltageC, self.currentC,
                                                                     self.power_factorC)
        len_tmp = len(self.all_watch_power_electricity_needlistA)

        if (len_tmp < (15 * 60 / self.electricity_time)):
            self.diaobiao_need_list_append()
        else:
            self.diaobiao_need_list_change(self.power_need_index)

        ########################################################

        if (self.activeA_way == 0):
            self.all_watch_power_electricity_needlistA[self.power_need_index] = (watch_power_tmpA)
            self.all_active_power_electricity_needlistA[self.power_need_index] = (active_power_tmpA)
        else:
            self.all_watch_power_electricity_needlistA1[self.power_need_index] = (watch_power_tmpA)
            self.all_active_power_electricity_needlistA1[self.power_need_index] = (active_power_tmpA)
        #################################ALL######################################################################
        all_watch_power = watch_power_tmpA + watch_power_tmpB + watch_power_tmpC
        all_active_power = active_power_tmpA + active_power_tmpB + active_power_tmpC
        all_reactive_power_tmp = reactive_power_tmpA + reactive_power_tmpB + reactive_power_tmpC

        if (self.activeA_way == 0):
            self.all_watch_power_electricity_needlistALL[self.power_need_index] = (all_watch_power)
            self.all_active_power_electricity_needlistALL[self.power_need_index] = (all_active_power)
        else:
            self.all_watch_power_electricity_needlistALL1[self.power_need_index] = (all_watch_power)
            self.all_active_power_electricity_needlistALL1[self.power_need_index] = (all_active_power)

        for i in range(14):
            try:
                time_tmp_str = self.dict_tmp["feilv_time_" + str(i + 1)]
            except:
                time_tmp_str = ""
            if (len(time_tmp_str) == 0):
                pass
            else:
                time_tmp_list = time_tmp_str.split("-")
                time_tmp_start_list = time_tmp_list[0].split(":")
                time_tmp_start_hour = int(time_tmp_start_list[0])
                time_tmp_start_min = int(time_tmp_start_list[1])

                time_tmp_end_list = time_tmp_list[1].split(":")
                time_tmp_end_hour = int(time_tmp_end_list[0])
                time_tmp_end_min = int(time_tmp_end_list[1])
                if ((time_tmp_end_hour * 60 + time_tmp_end_min) > (time_tmp_start_hour * 60 + time_tmp_start_min)):
                    if ((new_all_min >= (time_tmp_start_hour * 60 + time_tmp_start_min))
                            and (new_all_min < (time_tmp_end_hour * 60 + time_tmp_end_min))):
                        if (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "1"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv1_needlistALL[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv1_needlistALL[self.power_need_index] = (
                                    all_active_power)

                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv1_needlistALL1[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv1_needlistALL1[self.power_need_index] = (
                                    all_active_power)

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "2"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv2_needlistALL[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv2_needlistALL[self.power_need_index] = (
                                    all_active_power)

                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv2_needlistALL1[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv2_needlistALL1[self.power_need_index] = (
                                    all_active_power)

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "3"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv3_needlistALL[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv3_needlistALL[self.power_need_index] = (
                                    all_active_power)

                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv3_needlistALL1[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv3_needlistALL1[self.power_need_index] = (
                                    all_active_power)

                        elif (self.dict_tmp["feilv_time_" + str(i + 1) + "_way"] == "4"):
                            if (self.activeA_way == 0):
                                self.all_watch_power_electricity_feilv4_needlistALL[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv4_needlistALL[self.power_need_index] = (
                                    all_active_power)

                            elif (self.activeA_way == 1):
                                self.all_watch_power_electricity_feilv4_needlistALL1[self.power_need_index] = (
                                    all_watch_power)
                                self.all_active_power_electricity_feilv4_needlistALL1[self.power_need_index] = (
                                    all_active_power)

        #########################################################
        self.power_need_index = self.power_need_index + 1
        if (self.power_need_index == (15 * 60 / self.electricity_time)):
            self.power_need_index = 0
        ##################################################################
        len_tmp = len(self.all_watch_power_electricity_needlistA)
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needA):
            self.all_watch_power_electricity_needA = max_power_need_tmp
            self.all_watch_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistA1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needA1):
            self.all_watch_power_electricity_needA1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeA1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needA):
            self.all_active_power_electricity_needA = max_power_need_tmp
            self.all_active_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistA1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needA1):
            self.all_active_power_electricity_needA1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeA1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needA):
            self.all_quadrant1_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needA):
            self.all_quadrant2_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needA):
            self.all_quadrant3_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistA[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needA):
            self.all_quadrant4_reactive_power_electricity_needA = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeA = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1A[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1A):
            self.all_quadrant_reactive_power_electricity_needstruct1A = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1A = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2A[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2A):
            self.all_quadrant_reactive_power_electricity_needstruct2A = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2A = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needB):
            self.all_watch_power_electricity_needB = max_power_need_tmp
            self.all_watch_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistB1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needB1):
            self.all_watch_power_electricity_needB1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeB1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needB):
            self.all_active_power_electricity_needB = max_power_need_tmp
            self.all_active_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistB1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needB1):
            self.all_active_power_electricity_needB1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeB1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needB):
            self.all_quadrant1_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needB):
            self.all_quadrant2_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needB):
            self.all_quadrant3_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistB[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needB):
            self.all_quadrant4_reactive_power_electricity_needB = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeB = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1B[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1B):
            self.all_quadrant_reactive_power_electricity_needstruct1B = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1B = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2B[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2B):
            self.all_quadrant_reactive_power_electricity_needstruct2B = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2B = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needC):
            self.all_watch_power_electricity_needC = max_power_need_tmp
            self.all_watch_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistC1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needC1):
            self.all_watch_power_electricity_needC1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeC1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needC):
            self.all_active_power_electricity_needC = max_power_need_tmp
            self.all_active_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistC1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needC1):
            self.all_active_power_electricity_needC1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeC1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needC):
            self.all_quadrant1_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needC):
            self.all_quadrant2_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needC):
            self.all_quadrant3_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistC[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needC):
            self.all_quadrant4_reactive_power_electricity_needC = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeC = time.strftime("%Y-%m-%d-%H-%M",
                                                                                    time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1C[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1C):
            self.all_quadrant_reactive_power_electricity_needstruct1C = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1C = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2C[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2C):
            self.all_quadrant_reactive_power_electricity_needstruct2C = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2C = time.strftime("%Y-%m-%d-%H-%M",
                                                                                          time.localtime())
        ######################################ALL################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needALL):
            self.all_watch_power_electricity_needALL = max_power_need_tmp
            self.all_watch_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_needALL1):
            self.all_watch_power_electricity_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needALL):
            self.all_active_power_electricity_needALL = max_power_need_tmp
            self.all_active_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_needALL1):
            self.all_active_power_electricity_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_needALL):
            self.all_quadrant1_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                      time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_needALL):
            self.all_quadrant2_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                      time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_needALL):
            self.all_quadrant3_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                      time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_needALL):
            self.all_quadrant4_reactive_power_electricity_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                      time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                            time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                            time.localtime())
        #########################################################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv1_needALL):
            self.all_watch_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv1_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv1_needALL1):
            self.all_watch_power_electricity_feilv1_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv1_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv1_needALL):
            self.all_active_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv1_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv1_needALL1):
            self.all_active_power_electricity_feilv1_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv1_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M",
                                                                                  time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv1_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv1_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv1_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv1_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv1_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv1_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv1_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv1_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
        ##########################################################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv2_needALL):
            self.all_watch_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv2_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv2_needALL1):
            self.all_watch_power_electricity_feilv2_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv2_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv2_needALL):
            self.all_active_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv2_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv2_needALL1):
            self.all_active_power_electricity_feilv2_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv2_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M",
                                                                                  time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv2_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv2_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv2_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv2_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv2_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv2_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv2_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv2_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
        ############################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv3_needALL):
            self.all_watch_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv3_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv3_needALL1):
            self.all_watch_power_electricity_feilv3_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv3_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv3_needALL):
            self.all_active_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv3_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv3_needALL1):
            self.all_active_power_electricity_feilv3_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv3_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M",
                                                                                  time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv3_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv3_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv3_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv3_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv3_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv3_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv3_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv3_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
        ####################################################################
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv4_needALL):
            self.all_watch_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_watch_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_watch_power_electricity_feilv4_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_watch_power_electricity_feilv4_needALL1):
            self.all_watch_power_electricity_feilv4_needALL1 = max_power_need_tmp
            self.all_watch_power_electricity_feilv4_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv4_needALL):
            self.all_active_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_active_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M", time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_active_power_electricity_feilv4_needlistALL1[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_active_power_electricity_feilv4_needALL1):
            self.all_active_power_electricity_feilv4_needALL1 = max_power_need_tmp
            self.all_active_power_electricity_feilv4_needtimeALL1 = time.strftime("%Y-%m-%d-%H-%M",
                                                                                  time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant1_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant1_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant1_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant1_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant2_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant2_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant2_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant2_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())
        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant3_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant3_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant3_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant3_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant4_reactive_power_electricity_feilv4_needlistALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant4_reactive_power_electricity_feilv4_needALL):
            self.all_quadrant4_reactive_power_electricity_feilv4_needALL = max_power_need_tmp
            self.all_quadrant4_reactive_power_electricity_feilv4_needtimeALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                             time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv4_needliststruct1ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL):
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct1ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct1ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())

        ava_tmp_all = 0.0
        for i in range(len_tmp):
            ava_tmp_all = ava_tmp_all + self.all_quadrant_reactive_power_electricity_feilv4_needliststruct2ALL[i]
        max_power_need_tmp = ava_tmp_all / len_tmp

        if (max_power_need_tmp > self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL):
            self.all_quadrant_reactive_power_electricity_feilv4_needstruct2ALL = max_power_need_tmp
            self.all_quadrant_reactive_power_electricity_feilv4_needtimestruct2ALL = time.strftime("%Y-%m-%d-%H-%M",
                                                                                                   time.localtime())
########################################################################################################################
    def diaobiao_feilv_calculate(self):
        new_time_data=time.localtime(time.time())
        new_all_min=new_time_data.tm_hour*60+new_time_data.tm_min

        watch_power_electricity_tmpA=self.dianbiao_watch_power_electricity_calculate(self.voltageA, self.currentA)
        watch_power_electricity_tmpB=self.dianbiao_watch_power_electricity_calculate(self.voltageB, self.currentB)
        watch_power_electricity_tmpC=self.dianbiao_watch_power_electricity_calculate(self.voltageC, self.currentC)

        active_power_electricity_tmpA = self.dianbiao_active_power_electricity_calculate(self.voltageA, self.currentA,
                                                                                        self.power_factorA)
        active_power_electricity_tmpB = self.dianbiao_active_power_electricity_calculate(self.voltageB, self.currentB,
                                                                                         self.power_factorB)
        active_power_electricity_tmpC = self.dianbiao_active_power_electricity_calculate(self.voltageC, self.currentC,
                                                                                         self.power_factorC)

        reactive_power_electricity_tmpA = self.dianbiao_reactive_power_electricity_calculate(self.voltageA,
                                                                                            self.currentA,
                                                                                            self.power_factorA)
        reactive_power_electricity_tmpB = self.dianbiao_reactive_power_electricity_calculate(self.voltageB,
                                                                                             self.currentB,
                                                                                             self.power_factorB)
        reactive_power_electricity_tmpC = self.dianbiao_reactive_power_electricity_calculate(self.voltageC,
                                                                                             self.currentC,
                                                                                             self.power_factorC)

        for i in range(14):
            try:
                time_tmp_str=self.dict_tmp["feilv_time_"+str(i+1)]
            except:
                time_tmp_str=""
            if(len(time_tmp_str)==0):
                pass
            else:
                time_tmp_list = time_tmp_str.split("-")
                time_tmp_start_list = time_tmp_list[0].split(":")
                time_tmp_start_hour=int(time_tmp_start_list[0])
                time_tmp_start_min = int(time_tmp_start_list[1])

                time_tmp_end_list = time_tmp_list[1].split(":")
                time_tmp_end_hour=int(time_tmp_end_list[0])
                time_tmp_end_min=int(time_tmp_end_list[1])
                if((time_tmp_end_hour*60+time_tmp_end_min)>(time_tmp_start_hour*60+time_tmp_start_min)):
                    if((new_all_min>=(time_tmp_start_hour*60+time_tmp_start_min))
                            and(new_all_min<(time_tmp_end_hour*60+time_tmp_end_min))):
                        if(self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="1"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv1A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv1A   +=active_power_electricity_tmpA
                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv1A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv1A1 += active_power_electricity_tmpA

                        elif (self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="2"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv2A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv2A   +=active_power_electricity_tmpA

                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv2A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv2A1 += active_power_electricity_tmpA

                        elif (self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="3"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv3A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv3A   +=active_power_electricity_tmpA

                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv3A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv3A1 += active_power_electricity_tmpA

                        elif (self.dict_tmp["feilv_time_"+str(i+1)+"_way"]=="4"):
                            if(self.activeA_way==0):
                                self.all_watch_power_electricity_feilv4A+=watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv4A   +=active_power_electricity_tmpA

                            elif (self.activeA_way==1):
                                self.all_watch_power_electricity_feilv4A1 += watch_power_electricity_tmpA
                                self.all_active_power_electricity_feilv4A1 += active_power_electricity_tmpA

########################################################################################################################
    def calculate_powers(self,time_tmp):
        self.electricity_time=time_tmp
        self.voltageA = self.dianbiao_voltage_creatA()
        self.voltageB = self.dianbiao_voltage_creatB()
        self.voltageC = self.dianbiao_voltage_creatC()

        self.currentA = self.dianbiao_current_creatA()
        self.currentB = self.dianbiao_current_creatB()
        self.currentC = self.dianbiao_current_creatC()

        self.power_factorA = self.dianbiao_power_factor_creatA()
        self.power_factorB = self.dianbiao_power_factor_creatB()
        self.power_factorC = self.dianbiao_power_factor_creatC()

        self.activeA_way = self.dianbiao_active_way_creatA()
        self.activeB_way = self.dianbiao_active_way_creatA()
        self.activeC_way = self.dianbiao_active_way_creatA()

        self.reactiveA_way = self.dianbiao_reactive_way_creatA()
        self.reactiveB_way = self.dianbiao_reactive_way_creatA()
        self.reactiveC_way = self.dianbiao_reactive_way_creatA()

        self.frequency = 50+float(random.randint(-5,5))/10#1位小数

        #视在电能
        watch_powerA_tmp = self.dianbiao_watch_power_calculate(self.voltageA, self.currentA)
        watch_powerB_tmp = self.dianbiao_watch_power_calculate(self.voltageB, self.currentB)
        watch_powerC_tmp = self.dianbiao_watch_power_calculate(self.voltageC, self.currentC)
        # 当前视在一分钟电量
        watch_power_electricityA_tmp = watch_powerA_tmp * time_tmp / 3600000
        watch_power_electricityB_tmp = watch_powerB_tmp * time_tmp / 3600000
        watch_power_electricityC_tmp = watch_powerC_tmp * time_tmp / 3600000

        #当前有功功率电能
        active_powerA_tmp = self.dianbiao_active_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        active_powerB_tmp = self.dianbiao_active_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        active_powerC_tmp = self.dianbiao_active_power_calculate(self.voltageC,self.currentC,self.power_factorC)
        # 当前有功一分钟电量
        active_power_electricityA_tmp = active_powerA_tmp * time_tmp / 3600000
        active_power_electricityB_tmp = active_powerB_tmp * time_tmp / 3600000
        active_power_electricityC_tmp = active_powerC_tmp * time_tmp / 3600000

        # 当前无功功率
        reactive_powerA_tmp = self.dianbiao_reactive_power_calculate(self.voltageA,self.currentA,self.power_factorA)
        reactive_powerB_tmp = self.dianbiao_reactive_power_calculate(self.voltageB,self.currentB,self.power_factorB)
        reactive_powerC_tmp = self.dianbiao_reactive_power_calculate(self.voltageC,self.currentC,self.power_factorC)
        # 当前无功一分钟电量
        reactive_power_electricityA_tmp = reactive_powerA_tmp * time_tmp / 3600000
        reactive_power_electricityB_tmp = reactive_powerB_tmp * time_tmp / 3600000
        reactive_power_electricityC_tmp = reactive_powerC_tmp * time_tmp / 3600000

        active_powerALL_tmp=active_powerA_tmp+active_powerB_tmp+active_powerC_tmp
        reactive_powerALL_tmp=reactive_powerA_tmp+reactive_powerB_tmp+reactive_powerC_tmp
        #总功率因子
        self.power_factorALL= self.power_factorA


        if (self.activeA_way == 0):
            self.all_watch_power_electricityA  += watch_power_electricityA_tmp
            self.all_active_power_electricityA += active_power_electricityA_tmp
        elif (self.activeA_way == 1):
            self.all_watch_power_electricityA1  += watch_power_electricityA_tmp
            self.all_active_power_electricityA1 += active_power_electricityA_tmp

        ###需量计算###########################################################################
        self.diaobiao_need_clean()
        self.diaobiao_need_calculate()
        ###费率表计算##########################################################################
        self.diaobiao_feilv_calculate()
        ########################################################################################
        self.dianbiao_cold_data()
        self.cold_data_write()
        self.dianbiao_log_write()
        #self.dianbiao_debug()
########################################################################################################################
# 象限1 A 无功电量
    #
    def dianbiao_quadrant1_all_reactive_power_electricity_showA(self):
        return 0
    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showA(self):
        return 0
    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showA(self):
        return 0
    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showA(self):
        return 0
    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showA(self):
        return 0

    # 象限2 A 无功电量
    #
    def dianbiao_quadrant2_all_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showA(self):
        return 0

    # 象限3 A 无功电量
    #
    def dianbiao_quadrant3_all_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showA(self):
        return 0

    # 象限4 A 无功电量
    #
    def dianbiao_quadrant4_all_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showA(self):
        return 0

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showA(self):
        return 0

    # 象限1 B 无功电量
    #
    def dianbiao_quadrant1_all_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showB(self):
        return 0

    # 象限2 B 无功电量
    #
    def dianbiao_quadrant2_all_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showB(self):
        return 0

    # 象限3 B 无功电量
    #
    def dianbiao_quadrant3_all_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showB(self):
        return 0

    # 象限4 B 无功电量
    #
    def dianbiao_quadrant4_all_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showB(self):
        return 0

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showB(self):
        return 0

    # 象限1 C 无功电量
    #
    def dianbiao_quadrant1_all_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showC(self):
        return 0

    # 象限2 C 无功电量
    #
    def dianbiao_quadrant2_all_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showC(self):
        return 0

    # 象限3 C 无功电量
    #
    def dianbiao_quadrant3_all_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showC(self):
        return 0

    # 象限4 C 无功电量
    #
    def dianbiao_quadrant4_all_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showC(self):
        return 0

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showC(self):
        return 0
    #################################################################################################
    def dianbiao_quadrant1_all_reactive_power_electricity_showALL(self):
        return 0
    def dianbiao_quadrant1_feilv1_reactive_power_electricity_showALL(self):
        return 0
    def dianbiao_quadrant1_feilv2_reactive_power_electricity_showALL(self):
        return 0
    def dianbiao_quadrant1_feilv3_reactive_power_electricity_showALL(self):
        return 0
    def dianbiao_quadrant1_feilv4_reactive_power_electricity_showALL(self):
        return 0

    #################################################################################################
    def dianbiao_quadrant2_all_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant2_feilv1_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant2_feilv2_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant2_feilv3_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant2_feilv4_reactive_power_electricity_showALL(self):
        return 0

    #################################################################################################
    def dianbiao_quadrant3_all_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant3_feilv1_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant3_feilv2_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant3_feilv3_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant3_feilv4_reactive_power_electricity_showALL(self):
        return 0

    #################################################################################################
    def dianbiao_quadrant4_all_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant4_feilv1_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant4_feilv2_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant4_feilv3_reactive_power_electricity_showALL(self):
        return 0

    def dianbiao_quadrant4_feilv4_reactive_power_electricity_showALL(self):
        return 0
    ##########################################################################
    def dianbiao_quadrant_reactive_power_electricity_showASTRUCT1(self):
        return 0
    def dianbiao_quadrant_reactive_power_electricity_showBSTRUCT1(self):
        return 0
    def dianbiao_quadrant_reactive_power_electricity_showCSTRUCT1(self):
        return 0
    def dianbiao_quadrant_reactive_power_electricity_showSTRUCT1(self):
        return 0
    def dianbiao_quadrant_feilv1_reactive_power_electricity_showSTRUCT1(self):
        return 0
    def dianbiao_quadrant_feilv2_reactive_power_electricity_showSTRUCT1(self):
        return 0
    def dianbiao_quadrant_feilv3_reactive_power_electricity_showSTRUCT1(self):
        return 0
    def dianbiao_quadrant_feilv4_reactive_power_electricity_showSTRUCT1(self):
        return 0
#############################################################################################################################
    def dianbiao_quadrant_reactive_power_electricity_showASTRUCT2(self):
        return 0
    def dianbiao_quadrant_reactive_power_electricity_showBSTRUCT2(self):
        return 0
    def dianbiao_quadrant_reactive_power_electricity_showCSTRUCT2(self):
        return 0
    def dianbiao_quadrant_reactive_power_electricity_showSTRUCT2(self):
        return 0
    def dianbiao_quadrant_feilv1_reactive_power_electricity_showSTRUCT2(self):
        return 0
    def dianbiao_quadrant_feilv2_reactive_power_electricity_showSTRUCT2(self):
        return 0
    def dianbiao_quadrant_feilv3_reactive_power_electricity_showSTRUCT2(self):
        return 0
    def dianbiao_quadrant_feilv4_reactive_power_electricity_showSTRUCT2(self):
        return 0
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    a=one_one_meter("123456789012",16,{})
    #for i in range(31):
    #    print(a.dianbiao_last_data_db_find(i))

    while 1:
        a.calculate_powers(60)
        time.sleep(60)
